forked from 0x30c4/FastOCR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·54 lines (50 loc) · 1.39 KB
/
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
46
47
48
49
50
51
52
53
54
version: "3.9"
services:
ocr_api_srv_prod:
image: fast_ocr
build:
context: .
container_name: ocr_api_srv_prod
restart: always
depends_on:
- db_prod
command: bash -c "bash /api-envsubst-log-ini.sh && alembic upgrade head && python main.py"
env_file:
- ./env/.env.ocr_api_srv.prod
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- DATABSE_PORT=${DATABSE_PORT}
ports:
- "6900:$API_PORT"
volumes:
- ./app:/code:ro
- ${UPLOAD_DIR_HOST}:${UPLOAD_DIR_CONT}:rw
- ${APP_LOG_DIR_HOST}:${APP_LOG_DIR_CONT}:rw
links:
- "db_prod:db"
db_prod:
image: postgres:latest
container_name: postgresql_db
restart: always
env_file:
- ./env/.env.db.prod
volumes:
- pgdata:/var/lib/postgresql/data
proxy_srv_prod:
build:
context: ./proxy
container_name: proxy_srv_prod
env_file:
- ./env/.env.proxy_srv_prod
ports:
- ${NGINX_LESTEN_PORT_HOST}:${NGINX_LESTEN_PORT_CONT}
volumes:
- ${MEDIA_ROOT_REL}:/vol/web/uploads:rw
- ${STATIC_ROOT_REL}:/vol/web/static:ro
links:
- "ocr_api_srv_prod:api.net"
volumes:
pgdata:
external: true