-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (97 loc) · 2.48 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: '3.9'
services:
postgres_project:
container_name: postgres_ghofle_container
image: postgres:15
hostname: ${DB_HOST}
command: -p ${DB_PORT}
restart: always
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
volumes:
- ./data/project/postgres:/var/lib/postgresql/data
networks:
- main_ghofle_network
redis_project:
container_name: ${REDIS_HOST}
hostname: ${REDIS_HOST}
image: redis:latest
restart: always
command: redis-server --requirepass ${REDIS_PASSWORD} --port ${REDIS_PORT}
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_PORT: ${REDIS_PORT}
volumes:
- ./redis.conf:/usr/local/etc/redis.conf
networks:
- main_ghofle_network
app_project:
build: .
hostname: app_project
container_name: project_ghofle_container
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 --chdir config config.wsgi:application -b 0.0.0.0:8001"
depends_on:
- postgres_project
- redis_project
expose:
- 8001
ports:
- "8001:8001"
networks:
- main_ghofle_network
volumes:
- .:/code/
- ./media:/code/media
- ./static:/code/static
seq:
image: datalust/seq:latest
container_name: seq_ghofle_container
hostname: ${SEQ_HOST}
ports:
- ${SEQ_PORT}:80
environment:
ACCEPT_EULA: "Y"
volumes:
- ./data/project/seq:/data
networks:
- main_ghofle_network
rabbitmq_project:
container_name: rabbitmq_ghofle_container
hostname: ${RABBITMQ_HOST}
image: rabbitmq:latest
networks:
- main_ghofle_network
restart: always
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS}
# nginx_project:
# image: nginx:latest
# hostname: nginx_project
# container_name: nginx_project_container
# command: nginx -g 'daemon off;'
# restart: always
# depends_on:
# - app_project
# expose:
# - "80"
# ports:
# - "81:80"
# networks:
# - main_ghofle_network
# volumes:
# - ./nginx.conf:/etc/nginx/nginx.conf
# - ./media:/code/media
# - ./static:/code/static
networks:
main_ghofle_network:
volumes:
static:
media:
data: