-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
44 lines (40 loc) · 957 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
version: "3.9"
services:
proxy:
build:
context: ./nginx
dockerfile: Dockerfile
restart: on-failure
ports:
- 80:80
- 443:443
volumes:
- ssl_data:/etc/resty-auto-ssl
environment:
ALLOWED_DOMAINS: "${BACKEND_ALLOWED_DOMAINS}"
SITES: "${BACKEND_ALLOWED_DOMAINS}=backend:8080"
backend:
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
command: bash -c "alembic upgrade head && uvicorn main:app --host 0.0.0.0 --port 8080"
ports:
- "8080:8080"
depends_on:
- database
database:
image: postgres:latest
volumes:
- itation-app-db-data:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
itation-app-db-data:
ssl_data: