-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (73 loc) · 1.72 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: '3.7'
services:
rabbitmq:
image: 'rabbitmq:3.6-management-alpine'
ports:
# The standard AMQP protocol port
- '5672:5672'
# HTTP management UI
- '15672:15672'
# Run this container on a private network for this application.
networks:
- network
# DATABASE SERVICE
dbpostgresql:
image: "postgres"
environment:
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'p0stgr3spwdFulFilIO'
POSTGRES_DB: fulfilio
PGPORT: 5432
networks:
- network
ports:
- '5445:5432'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 2s
retries: 15
restart: unless-stopped
# BACKEND SERVICE
backend:
build: ./wservices
command: "python /usr/src/app/app.py"
environment:
- DB_USER=postgres
- DB_PASSWORD=p0stgr3spwdFulFilIO
- DB_HOST=dbpostgresql
- DB_PORT=5432
- DB_NAME=fulfilio
- AMQP_URL=rabbitmq
- DEFAULT_APP_USER=fulfilio
- DEFAULT_APP_PASSWORD=fulfilio
networks:
- network
ports:
- '80:5000'
# depends_on:
# dbpostgresql:
# condition: service_healthy
restart: unless-stopped
volumes:
- datavolume:/usr/src/app/uploads
# CELERY
celery:
build: ./wservices
command: "celery -A products.products:celery worker --loglevel=info"
environment:
- DB_USER=postgres
- DB_PASSWORD=p0stgr3spwdFulFilIO
- DB_HOST=dbpostgresql
- DB_PORT=5432
- DB_NAME=fulfilio
- AMQP_URL=rabbitmq
networks:
- network
restart: unless-stopped
volumes:
- datavolume:/usr/src/app/uploads
volumes:
datavolume: {}
networks:
network: {}