-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
156 lines (148 loc) · 4.65 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
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
version: '3'
services:
reverse-proxy:
image: nginx:1.19.3
container_name: reverse-proxy
ports:
- "80:80"
- "443:443"
command: [nginx-debug, '-g', 'daemon off;']
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/empty:/etc/nginx/ssl-options.conf:ro
- ./certs/29th.local.crt:/etc/letsencrypt/live/29th.org/fullchain.pem:ro
- ./certs/29th.local.key:/etc/letsencrypt/live/29th.org/privkey.pem:ro
app:
build: ./personnel-app
container_name: app
command: npm run dev
volumes:
- ./personnel-app/src:/home/node/app/src
environment:
BASE_URL: https://personnel.29th.local
API_HOST: https://api.29th.local
COAT_DIR: https://api.29th.local/coats
FORUM_VANILLA_BASE_URL: https://vanilla.29th.local
FORUM_SMF_BASE_URL: https://29th.org/forums
FORUM_DISCOURSE_BASE_URL: https://forums.29th.local
WIKI_URL: https://29th.org/wiki
PERSONNEL_V3_URL: https://www.29th.local
api:
build: ./personnel-api
container_name: api
volumes:
- ./personnel-api/application:/var/www/html/application
- ./coats:/var/www/html/coats
environment:
DB_DEFAULT_DATABASE: personnel_v2
DB_DEFAULT_HOSTNAME: db-personnel
DB_DEFAULT_USERNAME: root
DB_DEFAULT_PASSWORD: pwd
DB_DEFAULT_PORT: 3306
DB_FORUMS_DATABASE: vanilla
DB_FORUMS_HOSTNAME: db-forums
DB_FORUMS_USERNAME: root
DB_FORUMS_PASSWORD: pwd
DB_FORUMS_PORT: 3306
ENCRYPTION_KEY: dev
ADMIN_API_KEY: dev
BASE_URL: https://api.29th.local
CORS_HOST: https://personnel.29th.local
VANILLA_BASE_URL: http://forums
VANILLA_API_KEY: $VANILLA_API_KEY
VANILLA_COOKIE_NAME: Vanilla
VANILLA_SECRET_KEY: dev
DISCOURSE_BASE_URL: http://host.docker.internal:3000
DISCOURSE_API_KEY: $DISCOURSE_API_KEY
DISCOURSE_COOKIE_NAME: discourse_jwt
DISCOURSE_SECRET_KEY: $DISCOURSE_SECRET_KEY
DISCOURSE_ENLISTMENT_CATEGORY_ID: 5
ENVIRONMENT: development
DIR_COAT_PUBLIC: /var/www/html/coats/
forums:
build: ./forums
container_name: forums
volumes:
- ./uploads:/var/www/html/uploads
environment:
DB_HOSTNAME: db-forums
DB_DATABASE: vanilla
DB_USERNAME: root
DB_PASSWORD: pwd
COOKIE_SALT: dev
COOKIE_DOMAIN: 29th.local
UPDATE_TOKEN: dev
PERSONNEL_HOST_NAME: personnel.29th.local
DEBUG: 1
v3:
build: ./personnel-v3
container_name: v3
volumes:
- ./personnel-v3:/usr/src/app
tmpfs: /usr/src/app/tmp
user: root
environment:
DATABASE_URL: mysql2://root:pwd@db-personnel
VANILLA_BASE_URL: http://forums
VANILLA_API_KEY: $VANILLA_API_KEY
DISCOURSE_BASE_URL: http://host.docker.internal:3000
DISCOURSE_API_KEY: $DISCOURSE_API_KEY
DISCOURSE_WEBHOOKS_SECRET: developmentsecret
V2_ADMIN_API_KEY: dev
V2_API_BASE_URL: api
FORUMS_COOKIE_NAME: Vanilla
FORUMS_SECRET_KEY: dev
DISCOURSE_COOKIE_NAME: discourse_jwt
DISCOURSE_SECRET_KEY: $DISCOURSE_SECRET_KEY
STORAGE_ENDPOINT: https://nyc3.digitaloceanspaces.com
STORAGE_BUCKET: 29th-uploads
STORAGE_REGION: nyc3
STORAGE_ACCESS_KEY_ID: $STORAGE_ACCESS_KEY_ID
STORAGE_SECRET_ACCESS_KEY: $STORAGE_SECRET_ACCESS_KEY
STORAGE_PUBLIC_HOST: https://uploads.29th.org
db-personnel:
image: mysql:8
container_name: db-personnel
command: [
'--default_authentication_plugin=mysql_native_password',
'--sql-mode=ALLOW_INVALID_DATES',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
restart: always
ports:
- "3306:3306"
volumes:
- ./db/personnel.sql:/docker-entrypoint-initdb.d/personnel.sql
- db-personnel-persistence:/var/lib/mysql
environment:
MYSQL_DATABASE: personnel_v2
MYSQL_ROOT_PASSWORD: pwd
db-forums:
image: mysql:8
container_name: db-forums
command: [
'--default_authentication_plugin=mysql_native_password',
'--sql-mode=ALLOW_INVALID_DATES',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
restart: always
ports:
- "3307:3306"
volumes:
- ./db/vanilla.sql:/docker-entrypoint-initdb.d/vanilla.sql
- db-vanilla-persistence:/var/lib/mysql
environment:
MYSQL_DATABASE: vanilla
MYSQL_ROOT_PASSWORD: pwd
phpmyadmin:
container_name: phpmyadmin
image: phpmyadmin/phpmyadmin
environment:
PMA_HOSTS: db-forums,db-personnel
PMA_USER: root
PMA_PASSWORD: pwd
volumes:
db-personnel-persistence:
db-vanilla-persistence: