-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
68 lines (67 loc) · 1.69 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
version: '3.9'
services:
# save 1 or more writes to disk every 20 seconds
cache:
container_name: cache
image: redis:6.2-alpine
volumes:
- ${CACHE_HOST_PATH}:${CACHE_CONTAINER_PATH}
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning
db:
container_name: db
image: postgres:15.2-alpine
environment:
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_USER: ${PG_USER}
POSTGRES_DB: ${PG_DB}
HOST_IP_ADDR: ${HOST_IP_ADDR}
volumes:
- ${DB_HOST_PATH}:${DB_CONTAINER_PATH}
ports:
- '5432:5432'
db_setup:
container_name: db_setup
image: postgres:15.2-alpine
volumes:
- ./scripts/init_db.sh:/usr/src/init_db.sh
environment:
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_USER: ${PG_USER}
POSTGRES_DB: ${PG_DB}
HOST_IP_ADDR: ${HOST_IP_ADDR}
depends_on:
- db
restart: 'no'
command: /usr/src/init_db.sh
engine:
container_name: engine
build:
context: .
dockerfile: Dockerfile.dev
environment:
HOST_IP_ADDR: ${HOST_IP_ADDR} # You have to pass this or we have no host IP context!
extra_hosts:
- ${HOST_LABEL}:${HOST_IP_ADDR}
depends_on:
- db_setup
ports:
- '5000:5000' # scraper
- '5001:5001' # core
- '5002:5002' # api
command: /usr/src/app/scripts/wait_for_db.sh
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.8-management-alpine
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS}
ports:
# AMQP protocol port
- '5672:5672'
# Management UI
- '15672:15672'
volumes:
db:
external: true