-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
130 lines (119 loc) · 3.13 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Steps to set up a new docker-compose machine:
#
# docker-compose run django ./manage.py migrate
# docker-compose run django ./manage.py createsuperuser
# docker-compose up
version: '3'
volumes:
node_modules:
services:
nginx:
image: nginx:alpine
ports:
- 80:80
- 443:443
links:
- "django"
volumes:
- ./etc/nginx/oddslingers-docker-compose.conf:/etc/nginx/nginx.conf
- ./data/certs:/opt/oddslingers.poker/data/certs
- ./core:/opt/oddslingers.poker/core
postgres:
image: postgres:12-alpine
env_file:
- .env
- .secrets.env
expose:
- 5432
volumes:
- ./database/postgres:/var/lib/postgresql/data
redis:
image: redis:5-alpine
entrypoint: redis-server --appendonly yes
expose:
- 6379
volumes:
- ./data/redis:/data
django:
build: .
image: oddslingers:django_base
working_dir: /opt/oddslingers.poker/core/
command: ./manage.py runserver --http_timeout 120 0.0.0.0:8000
stdin_open: true
tty: true
depends_on:
- postgres
- redis
environment:
ODDSLINGERS_ENV: DEV
POSTGRES_HOST: postgres
REDIS_HOST: redis
IS_DOCKER: 1
env_file:
- .env
- .secrets.env
expose:
- 8000
volumes:
- ./data:/opt/oddslingers.poker/data
- ./core:/opt/oddslingers.poker/core
- ./bin:/opt/oddslingers.poker/bin
webpack:
#image: node:8-alpine
build:
context: .
dockerfile: ./Dockerfile.webpack
image: oddslingers:webpack
command: sh -c "(webpack --mode development --watch --info-verbosity verbose & saas --watch scss/ -o ../static/css 2>&1 &)| cat"
stdin_open: true
tty: true
environment:
ODDSLINGERS_ENV: DEV
volumes:
- ./core/js:/opt/oddslingers.poker/core/js
- ./core/static:/opt/oddslingers.poker/core/static
# Hide local node_modules
- ./core/js/node_modules:/src/node_modules
# Add dumps for UI tests
- ./core/dumps:/opt/oddslingers.poker/core/dumps
dramatiq:
image: oddslingers:django_base
working_dir: /opt/oddslingers.poker/core/
command: nice -15 ./manage.py rundramatiq --processes 1 --threads 1
environment:
ODDSLINGERS_ENV: DEV
POSTGRES_HOST: postgres
REDIS_HOST: redis
cap_add:
- SYS_NICE
depends_on:
- redis
- postgres
env_file:
- .env
- .secrets.env
volumes:
- ./data:/opt/oddslingers.poker/data
- ./core:/opt/oddslingers.poker/core
- ./bin:/opt/oddslingers.poker/bin
#TODO: Fish script sourcing
yacron:
image: oddslingers:django_base
command: yacron -c /opt/oddslingers.poker/etc/yacron/oddslingers-dev.yaml
environment:
ODDSLINGERS_ENV: DEV
POSTGRES_HOST: postgres
REDIS_HOST: redis
IS_DOCKER: 1
depends_on:
- redis
- postgres
env_file:
- .env
- .secrets.env
volumes:
- ./etc:/opt/oddslingers.poker/etc
- ./data:/opt/oddslingers.poker/data
- ./core:/opt/oddslingers.poker/core
- ./etc/yacron:/opt/oddslingers.poker/etc/yacron
- ./bin:/opt/oddslingers.poker/bin