-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (57 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
64 lines (57 loc) · 1.35 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: '3.8'
services:
database:
container_name: 'notimy_postgres'
image: 'postgres:14'
restart: always
env_file:
- .env
environment:
POSTGRES_DB: main_db
POSTGRES_MAX_CONNECTIONS: 200
ports:
- '${POSTGRES_PORT}:${POSTGRES_PORT}'
volumes:
- data:/var/lib/postgresql/data
- ./init-db:/docker-entrypoint-initdb.d/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" ]
interval: 5s
retries: 5
start_period: 5s
timeout: 2s
backend:
container_name: 'notimy_backend'
depends_on:
database:
condition: service_healthy
restart: always
env_file: .env
environment:
- POSTGRES_HOST=database
build: ./backend
volumes:
- ./certs:/etc/ssl
ports:
- "${APP_PORT}:${APP_PORT}"
command: [ "sh", "-c", "poetry run alembic upgrade head && poetry run python -m app" ]
landing:
container_name: 'notimy_landing'
build: ./NotimyLanding
ports:
- "3001:3001"
volumes:
- ./NotimyLanding:/app
command: [ "npm", "run", "dev" ]
nginx:
container_name: 'notimy_nginx'
image: nginx:latest
ports:
- "443:443"
volumes:
- ./nginx/nginx-backend.conf:/etc/nginx/nginx.conf
- ./certs:/etc/ssl
depends_on:
- backend
volumes:
data: