-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-v4.yml
102 lines (95 loc) · 2.42 KB
/
docker-compose-v4.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
services:
gunicorn: &app_c
build: .
command: "/bin/bash -c 'chmod +x ./deploy/gunicorn.sh && ./deploy/gunicorn.sh'"
container_name: gunicorn-stagingserver
volumes:
- "./db.sqlite3:/STAGING_APP/db.sqlite3:rw"
- "./STAGING_DIR:/STAGING_DIR"
- "/var/run/docker.sock:/var/run/docker.sock"
# - "./:/STAGING_APP:rw" # for easy development, uncomment before commiting.
- ./nginx/configs:/STAGING_APP/nginx/configs
environment:
- DEBUG=0
depends_on:
- redis
expose:
- 7000
networks:
- staging-network
restart: always
daphne:
<<: *app_c
command: "daphne stagingserver.asgi:application -b 0.0.0.0 --port 7001"
container_name: daphne-stagingserver
depends_on:
- gunicorn
expose:
- 7001
networks:
staging-network:
ipv4_address: 172.21.1.5
redis:
container_name: redis-stagingserver
image: redis:alpine
networks:
- staging-network
restart: always
celery:
build: .
command: "celery -A stagingserver worker -l info"
container_name: celery-stagingserver
volumes:
- "./db.sqlite3:/STAGING_APP/db.sqlite3:rw"
- "./STAGING_DIR:/STAGING_DIR"
- "/var/run/docker.sock:/var/run/docker.sock"
# - "./:/STAGING_APP:rw" # for easy development, uncomment before commiting.
- "./nginx/configs:/STAGING_APP/nginx/configs"
environment:
- DEBUG=1
depends_on:
- redis
networks:
- staging-network
restart: always
socat:
build:
context: .
dockerfile: Dockerfile.socat
container_name: socat-stagingserver
command: "TCP-LISTEN:2375,reuseaddr,fork,range=172.21.1.5/32 UNIX-CONNECT:/var/run/docker.sock"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
expose:
- 2375
networks:
- staging-network
restart: always
nginx:
container_name: nginx-stagingserver
image: nginx:1.25.2
depends_on:
- daphne
- celery
ports:
- "127.0.0.1:9000:80"
volumes:
- "./nginx/configs:/etc/nginx/sites-enabled"
- "./nginx/nginx.conf:/etc/nginx/nginx.conf"
- ./assets:/assets
networks:
- IRIS
- staging-network
restart: always
networks:
# staging-network:
# name: staging-network
staging-network:
driver: bridge
ipam:
config:
- subnet: 172.21.1.0/16
IRIS:
name: IRIS
volumes:
configs: