amke hot reload work for node app
This commit is contained in:
parent
2ae502e790
commit
c3e363fb9b
3 changed files with 6 additions and 1 deletions
|
|
@ -10,6 +10,9 @@ RUN echo "listen_addresses='*'" >> /etc/postgresql/15/main/postgresql.conf && \
|
|||
echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/15/main/pg_hba.conf && \
|
||||
echo "host all all ::/0 md5" >> /etc/postgresql/15/main/pg_hba.conf
|
||||
|
||||
|
||||
RUN npm install -g nodemon
|
||||
|
||||
# Set up working directory for Express app
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
|
|
|||
|
|
@ -12,3 +12,5 @@ services:
|
|||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
volumes:
|
||||
- .:/app
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ su - postgres -c "psql -c \"CREATE DATABASE $POSTGRES_DB OWNER $POSTGRES_USER;\"
|
|||
caddy run --config /etc/caddy/Caddyfile &
|
||||
|
||||
# Start Express app
|
||||
npm start
|
||||
exec nodemon src/app.js
|
||||
|
||||
# Keep container running
|
||||
wait
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue