-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (40 loc) · 928 Bytes
/
docker-compose.yml
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
version: '3.8'
x-environments: &environments
SECRET_KEY: ${SECRET_KEY}
SENTRY_DSN_URL: ${SENTRY_DSN_URL}
ENVIRONMENT: ${ENVIRONMENT}
x-healthcheck-defaults: &healthcheck_defaults
interval: 10s
retries: 5
timeout: 10s
networks:
backend:
driver: bridge
services:
backend:
build:
context: .
dockerfile: ./deploy/backend/Dockerfile
image: ${CI_REGISTRY_IMAGE}/fastapi:${CI_COMMIT_REF_SLUG}
networks:
- backend
env_file:
- .env
environment:
<<: *environments
ports:
- "0.0.0.0:80:8000"
command: ["make", "run_prod"]
postgres:
image: postgres:12
networks:
- backend
environment:
POSTGRES_DB: ${POSTGRES_NAME}
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
<<: *healthcheck_defaults
ports:
- "5432:5432"