-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-nginx-gunicorn-fastapi.yml
68 lines (68 loc) · 1.42 KB
/
docker-compose-nginx-gunicorn-fastapi.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: '3'
services:
nginx:
build:
context: ""
dockerfile: ./Dockerfile.nginx
image: nginx:latest
ports:
- "8008:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- nginx_intel_nw
environment:
- DEFAULT_HOST=intel
depends_on:
- intel
intel:
build:
context: ""
dockerfile: ./Dockerfile.intel
image: intel:latest
entrypoint:
- /bin/entrypoint.sh
env_file:
- intel.env
ports:
- "5678"
environment:
- VIRTUAL_HOST=intel
- VIRTUAL_PORT=5678
- SERVICE_PORT=5678
- PG_HOST=db
- PG_PORT=5432
- PG_DBNAME=postgres
- PG_USER=postgres
- PG_PASSWORD=postgres
- APP_NAME=nginx-gunicorn-fastapi
networks:
- nginx_intel_nw
- intel_db_nw
depends_on:
db:
condition: service_healthy
db:
restart: always
image: postgres:alpine
networks:
- intel_db_nw
ports:
- "5432"
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./var/pgdata/intel:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
networks:
nginx_intel_nw:
driver: bridge
intel_db_nw:
driver: bridge