-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
73 lines (73 loc) · 1.71 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
services:
bot:
profiles:
- bot
- web
build: .
command: python -u /app/main.py >> /app/logs/bot.log 2>&1
privileged: true
volumes:
- .:/app
container_name: bot
restart: always
expose:
- 5421
environment:
LISTEN_HOST: '0.0.0.0'
INSIDE_DOCKER: 'true'
SOCKET_HOST: socketapp
SOCKET_PORT: 5001
web:
profiles:
- web
build: .
command: uwsgi /app/app.ini >> /app/logs/web.log 2>&1
privileged: true
volumes:
- .:/app
container_name: web
restart: always
expose:
- 80
depends_on:
- bot
environment:
SEND_HOST: bot
SEND_PORT: 5421
SOCKET_HOST: '' # leave blank if you dont have a specific location of socketapp (server_location:5001) (home server = botsocket subdomain)
DEBUG: 'false'
INSIDE_DOCKER: 'true'
socketapp:
profiles:
- web
build: ./socket
command: python -u /app/socket/socketapp.py >> /app/logs/socket.log 2>&1
privileged: true
volumes:
- .:/app
container_name: socketapp
restart: always
ports:
- "5001:5001" # external:internal (home server = 27001 / botsocket subdomain)
environment:
PORT: 5001
DEBUG: 'false'
HOST: '0.0.0.0'
INSIDE_DOCKER: 'true'
nginx:
image: nginx
profiles:
- web
volumes:
- ./logs:/logs
- ./nginx.conf:/etc/nginx/nginx.conf
container_name: nginx
restart: always
environment:
WEB_HOST: web
WEB_PORT: 80
ports:
- "80:80" # external:internal (home server = 27080 / botsocket subdomain)
- "443:443" # external:internal (home server = 27443 / no ssl on botsocket subdomain)
depends_on:
- web