-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose-prod.yml
executable file
·58 lines (52 loc) · 1.11 KB
/
docker-compose-prod.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
version: '3'
services:
bookstoreapi:
container_name: bookstore_api
build:
context: .
dockerfile: '${PWD}/docker/prod.Dockerfile'
env_file:
- ./bookstore-prod.env
command: /var/app/scripts/run_prod.sh
image: bookstoreapi:latest
depends_on:
- base
- bookstoreapi_db
networks:
- base-network
bookstoreapi_db:
container_name: bookstoreapi_db
image: postgres
restart: always
env_file:
- ./bookstore-prod.env
ports:
- '5432:5432'
volumes:
- bookstoreapi-db:/var/lib/postgresql/data
networks:
- base-network
celery:
env_file:
- ./bookstore-prod.env
image: bookstoreapi:latest
command: >
sh -c "celery -A bookstoreapi worker -B -D && celery worker -l info -A bookstoreapi"
depends_on:
- redis
- bookstoreapi
networks:
- base-network
nginx:
build: ./nginx
ports:
- '8003:80'
depends_on:
- bookstoreapi
volumes:
- static_volume:/var/app/bookstoreapi/static
networks:
- base-network
volumes:
static_volume:
bookstoreapi-db: