-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
122 lines (115 loc) · 2.54 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
version: '3.3'
services:
web:
command: python manage.py runserver 0.0.0.0:8000
expose:
- 8000
env_file:
- ./fiesta/.env.base
- .env
build:
context: .
dockerfile: Dockerfile
target: web-base
depends_on:
- db
volumes:
# for dev and also produp
- web_media_files:/usr/src/media
- wiki_db:/usr/src/wiki/db/
- wiki_static:/usr/src/wiki/static/wiki/
environment:
VIRTUAL_HOST: web.${ROOT_DOMAIN}
VIRTUAL_PORT: 8000
proxy:
build:
context: .
dockerfile: Dockerfile
target: proxy-base
command: [ nginx-debug, '-g', 'daemon off;' ]
expose:
- 80
depends_on:
- web
volumes:
- web_media_files:/var/media
- /var/run/docker.sock:/var/run/docker.sock
environment:
PROXY_HOSTNAME_TARGET: "web"
STATIC_LOCATION_PATTERN: "^\b$$"
VIRTUAL_HOST: "*.${ROOT_DOMAIN},${ROOT_DOMAIN}"
VIRTUAL_PORT: 80
db:
image: postgres:15-alpine3.17
volumes:
- postgres15_data:/var/lib/postgresql/data/
ports:
- "127.0.0.1:15432:5432"
expose:
- 5432
environment:
POSTGRES_USER: fiesta
POSTGRES_PASSWORD: fiesta
POSTGRES_DB: fiesta
TZ: Europe/Prague
webpack:
build:
context: .
dockerfile: Dockerfile
target: webpack-base
command: yarn dev
expose:
- 8003
env_file:
- ./webpack/.env.base
environment:
VIRTUAL_HOST: webpack.${ROOT_DOMAIN}
VIRTUAL_PORT: 8003
BUILD_DIR: /usr/src/build
ROOT_DOMAIN: ${ROOT_DOMAIN}
dockerproxy:
build:
context: ./nginx
dockerfile: dockerproxy.Dockerfile
logging:
driver: none
ports:
- "80:80"
- "443:443"
- "3306:3306"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
legacydb:
image: mariadb:10.4
profiles: [ "migration" ]
volumes:
- legacydb_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: fiesta
MYSQL_USER: fiesta
MYSQL_PASSWORD: fiesta
VIRTUAL_HOST: legacydb.${ROOT_DOMAIN}
VIRTUAL_PORT: 3306
ports:
- "4306:3306"
wikifetcher:
build:
context: .
dockerfile: Dockerfile
target: wiki-base
restart: on-failure
volumes:
- wiki_db:/usr/src/wiki/db/
- wiki_static:/usr/src/wiki/static/
env_file:
- .env
- wiki/.env.base
volumes:
postgres15_data:
legacydb_data:
webpack_build:
web_static_files:
web_media_files:
wiki_db:
wiki_static: