-
Notifications
You must be signed in to change notification settings - Fork 9
/
compose.yml
189 lines (171 loc) · 5.5 KB
/
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
services:
postgres:
image: wodby/postgres:$POSTGRES_TAG
container_name: "${PROJECT_NAME}_postgres"
stop_grace_period: 30s
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_DB: $DB_NAME
POSTGRES_USER: $DB_USER
# volumes:
# - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
# - /path/to/postgres/data/on/host:/var/lib/postgresql/data # I want to manage volumes manually.
# mariadb:
# image: wodby/mariadb:$MARIADB_TAG
# container_name: "${PROJECT_NAME}_mariadb"
# stop_grace_period: 30s
# environment:
# MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
# MYSQL_DATABASE: $DB_NAME
# MYSQL_USER: $DB_USER
# MYSQL_PASSWORD: $DB_PASSWORD
# volumes:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.
python:
build:
context: ./
args:
PYTHON_TAG: $PYTHON_TAG
container_name: "${PROJECT_NAME}_python"
environment:
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
DB_ENGINE: $DB_ENGINE
volumes:
- ./:/usr/src/app:cached
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/python/local#docker-for-mac
# - backend:/usr/src/app
nginx:
image: wodby/nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- python
environment:
NGINX_STATIC_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_VHOST_PRESET: django
NGINX_BACKEND_HOST: python
# Use this if you don't need Django's media/static locations.
#NGINX_VHOST_PRESET: http-proxy
volumes:
- ./:/usr/src/app:cached
## Alternative for macOS users: Mutagen https://wodby.com/docs/stacks/python/local#docker-for-mac
# - backend:/usr/src/app
labels:
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
mailpit:
image: axllent/mailpit
container_name: "${PROJECT_NAME}_mailpit"
labels:
- "traefik.http.services.${PROJECT_NAME}_mailpit.loadbalancer.server.port=8025"
- "traefik.http.routers.${PROJECT_NAME}_mailpit.rule=Host(`mailpit.${PROJECT_BASE_URL}`)"
# varnish:
# image: wodby/varnish:$VARNISH_TAG
# container_name: "${PROJECT_NAME}_varnish"
# depends_on:
# - nginx
# environment:
# VARNISH_SECRET: secret
# VARNISH_BACKEND_HOST: nginx
# VARNISH_BACKEND_PORT: 80
# VARNISH_ALLOW_UNRESTRICTED_PURGE: 1
# labels:
# - "traefik.http.services.${PROJECT_NAME}_varnish.loadbalancer.server.port=6081"
# - "traefik.http.routers.${PROJECT_NAME}_varnish.rule=Host(`varnish.${PROJECT_BASE_URL}`)"
valkey:
container_name: "${PROJECT_NAME}_valkey"
image: wodby/valkey:$VALKEY_TAG
# adminer:
# container_name: "${PROJECT_NAME}_adminer"
# image: wodby/adminer:$ADMINER_TAG
# init: true
# environment:
# ADMINER_DEFAULT_DB_DRIVER: pgsql
## # For MariaDB:
## ADMINER_DEFAULT_DB_DRIVER: server
# ADMINER_DEFAULT_DB_HOST: $DB_HOST
# ADMINER_DEFAULT_DB_NAME: $DB_NAME
# labels:
# - "traefik.http.routers.${PROJECT_NAME}_adminer.rule=Host(`adminer.${PROJECT_BASE_URL}`)"
# solr:
# image: wodby/solr:$SOLR_TAG
# container_name: "${PROJECT_NAME}_solr"
# environment:
# SOLR_HEAP: 1024m
# labels:
# - "traefik.http.services.${PROJECT_NAME}_solr.loadbalancer.server.port=8983"
# - "traefik.http.routers.${PROJECT_NAME}_solr.rule=Host(`solr.${PROJECT_BASE_URL}`)"
# elasticsearch:
# image: wodby/elasticsearch:$ELASTICSEARCH_TAG
# environment:
# ES_JAVA_OPTS: "-Xms500m -Xmx500m"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# kibana:
# image: wodby/kibana:$KIBANA_TAG
# depends_on:
# - elasticsearch
# labels:
# - "traefik.http.services.${PROJECT_NAME}_kibana.loadbalancer.server.port=5601"
# - "traefik.http.routers.${PROJECT_NAME}_kibana.rule=Host(`kibana.${PROJECT_BASE_URL}`)"
# memcached:
# container_name: "${PROJECT_NAME}_memcached"
# image: wodby/memcached:$MEMCACHED_TAG
# rsyslog:
# container_name: "${PROJECT_NAME}_rsyslog"
# image: wodby/rsyslog:$RSYSLOG_TAG
# gotenberg:
# image: gotenberg/gotenberg
# container_name: "${PROJECT_NAME}_gotenberg"
# node:
# image: wodby/node:$NODE_TAG
# container_name: "${PROJECT_NAME}_node"
# working_dir: /app
# labels:
# - "traefik.http.services.${PROJECT_NAME}_node.loadbalancer.server.port=3000"
# - "traefik.http.routers.${PROJECT_NAME}_node.rule=Host(`node.${PROJECT_BASE_URL}`)"
# expose:
# - "3000"
# volumes:
# - ./path/to/your/single-page-app:/app
# command: sh -c 'npm install && npm run start'
# opensmtpd:
# container_name: "${PROJECT_NAME}_opensmtpd"
# image: wodby/opensmtpd:$OPENSMTPD_TAG
traefik:
image: traefik:v2.0
container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker
ports:
- '8000:80'
# - '8080:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#x-mutagen:
# sync:
# defaults:
# ignore:
# vcs: true
# paths:
# - .DS_Store
# - .history
# - .idea
# backend:
# alpha: "."
# beta: "volume://backend"
# configurationBeta:
# permissions:
# defaultFileMode: 0644
# defaultDirectoryMode: 0755
# defaultOwner: "id:501"
# defaultGroup: "id:20"
#volumes:
## Mutagen for macOS users
# backend:
## For Xdebug profiler
# files: