-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
41 lines (39 loc) · 978 Bytes
/
docker-compose.yaml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: '3.8'
services:
db:
image: postgres:15
container_name: code_together_database
restart: always
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
volumes:
- pgdata:/var/lib/postgresql/data/pgdata
env_file:
- .env
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
- POSTGRES_USER=${POSTGRES_USER?Variable not set}
- POSTGRES_DB=${POSTGRES_DB?Variable not set}
command: -p ${POSTGRES_PORT}
expose:
- ${POSTGRES_PORT}
app:
build:
context: .
container_name: code_together_application
command: [ "/app/scripts/app-entrypoint.sh" ]
ports:
- 9999:8000
env_file:
- .env
depends_on:
db:
condition: service_healthy
restart: true
volumes:
pgdata: