-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·67 lines (60 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
executable file
·67 lines (60 loc) · 1.64 KB
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
services:
redis:
image: redis
hostname: ${REDIS_HOST}
container_name: redis_account
command: redis-server --requirepass ${REDIS_PASSWORD} --port ${REDIS_PORT}
restart: on-failure
environment:
REDIS_PASSWORD: redis
REDIS_PORT: ${REDIS_PORT}
volumes:
- ./redis.conf:/usr/local/etc/redis.conf
expose:
- ${REDIS_PORT}
ports:
- ${REDIS_PORT}:${REDIS_PORT}
networks:
- account_network
accounts:
build: .
image: accounts_service_image
container_name: account_container
hostname: ${ACCOUNT_HOST}
restart: on-failure
command: sh -c "python3 manage.py makemigrations &&
python3 manage.py migrate --no-input &&
python3 manage.py collectstatic --no-input &&
gunicorn -k gevent --workers 4 config.wsgi:application -b 0.0.0.0:${DJANGO_PORT}"
depends_on:
- redis
env_file:
- .env
ports:
- ${DJANGO_PORT}:${DJANGO_PORT}
volumes:
- .:/accounts
networks:
- account_network
- keycloak_network
celery-worker:
build: .
image: celery_account_image
container_name: celery_account_container
hostname: celery_account
command: bash -c " celery -A config worker -l info "
environment:
- BROKER_URL=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
- RESULT_BACKEND=redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/0
restart: on-failure
depends_on:
- accounts
- redis
volumes:
- .:/accounts
networks:
- account_network
networks:
account_network:
keycloak_network:
external: true