forked from harley-harris/GOV.UK-Web-App-Prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
25 lines (25 loc) · 794 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
25 lines (25 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version: '3.8'
services:
db:
container_name: compose-db-container
image: postgres
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=${POSTGRES_HOST} # https://stackoverflow.com/questions/33357567/econnrefused-for-postgres-on-nodejs-with-dockers
volumes:
#- ./db:/var/lib/postgresql/data # --> uncomment to create db folder in root dir and persist data after stopping containers
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
web:
container_name: compose-web-container
restart: always
build: .
ports:
- ${PORT}:${PORT}
depends_on:
- db
volumes:
- .:/usr/src/app