-
Notifications
You must be signed in to change notification settings - Fork 114
/
docker-compose.yml
166 lines (157 loc) · 6.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
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
###############################################################################
# Generated on phpdocker.io #
#
# Generic instructions: docker-compose up -d
#
# webDiplomacy instructions:
# PHP Composer is required to be installed in order to get the required PHP dependencies, this is a requirement
# for the system you loaded the sourcecode onto before starting the docker images.
# Run composer update in the source root folder to create the vendor folder
# which contains the required PHP dependencies.
# Check http://localhost:43000/gamemaster-entrypoint.txt ; once the server is ready you should see
# that gamemaster has started running. If there is an issue this is the best place to check.
# Register a user account via http://localhost:43000/register.php, using any e-mail address
# then use http://localhost:43001 / mailhog to access the registration link.
# Taking the registration link code and adding it to your webserver should give e.g.:
# (If using the config.sample.php defaults you can use the link below directly:)
# http://localhost:43000/register.php?emailToken=9513e6f6%7C1665482821%7Ctest%40test.com
# Complete filling the registration form, then once logged on:
# Go to http://localhost:43000/gamemaster.php?gameMasterSecret= to set self as admin
# Go to http://localhost:43000/admincp.php?tab=Control%20Panel&actionName=maintenance#maintenance to enable maintenance mode
# Go to http://localhost:43000/admincp.php?actionName=wipeVariants#wipeVariants to clear variant data
# Go to http://localhost:43000/admincp.php?actionName=updateVariantInfo&variantID=#updateVariantInfo to regenerate variant data
# Go to http://localhost:43000/datc.php?testID=101&batchTest=12345 to run through the DATC test cases
# Go to http://localhost:43000/admincp.php?tab=Control%20Panel&actionName=maintenance#maintenance to disable maintenance mode
#
# Server is ready for dev work
#
# If config.php isn't changed you can use these links below to quickly register 7 users:
# http://localhost:43000/logon.php?logoff=on
# http://localhost:43000/register.php?emailToken=9513e6f6%7C1665482821%7Ctest%40test.com
# http://localhost:43000/logon.php?logoff=on
# http://localhost:43000/register.php?emailToken=b3aa9320%7C1665483920%7Ctest2%40test.com
# http://localhost:43000/logon.php?logoff=on
# http://localhost:43000/register.php?emailToken=8749c175%7C1665483937%7Ctest3%40test.com
# http://localhost:43000/logon.php?logoff=on
# http://localhost:43000/register.php?emailToken=d9da3907%7C1665483948%7Ctest4%40test.com
# http://localhost:43000/logon.php?logoff=on
# http://localhost:43000/register.php?emailToken=f62e0ff3%7C1665483960%7Ctest5%40test.com
# http://localhost:43000/logon.php?logoff=on
# http://localhost:43000/register.php?emailToken=d63245b5%7C1665483971%7Ctest6%40test.com
# http://localhost:43000/logon.php?logoff=on
# http://localhost:43000/register.php?emailToken=e2c45b63%7C1665483982%7Ctest7%40test.com
#
# To use the default no-press bots start up the bots profile.
# Note that the bot docker image has to download a ~300MB file on startup, and on first run
# there is more installation than most, so bots can take some time to start.
#
###############################################################################
version: "3.1"
services:
memcached:
image: "memcached:alpine"
container_name: webdiplomacy-memcached
ports:
- "11211"
hostname: memcached
mailhog:
image: "mailhog/mailhog:latest"
ports:
- "43001:8025"
hostname: mailhog
mariadb:
image: "mariadb:10.6"
container_name: "webdiplomacy-db"
restart: always
working_dir: /application
volumes:
- "./:/application"
environment:
- MYSQL_ROOT_PASSWORD=mypassword123
- MYSQL_DATABASE=webdiplomacy
- MYSQL_USER=webdiplomacy
- MYSQL_PASSWORD=mypassword123
ports:
- "43003:3306"
hostname: webdiplomacy-db
phpmyadmin:
image: phpmyadmin
restart: always
ports:
- ${PHPMYADMIN_PORT:-8080}:80
environment:
- PMA_ARBITRARY=1
hostname: phpmyadmin
clickhouse:
image: "yandex/clickhouse-server:latest"
hostname: clickhouse
# This is necessary for doing live React dev for the new board, but isn't needed after doing a build. If the nginx config is changed to not redirect /beta/ to port 3000:
webserver:
image: "nginx:alpine"
working_dir: /application
volumes:
- "./:/application"
- "./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf"
ports:
- "${WEBDIP_PORT:-43000}:80"
depends_on:
- "php-fpm"
hostname: webserver
beta:
image: "node:16.15.1-alpine3.14"
container_name: webdiplomacy-beta
working_dir: /application
volumes:
- "./beta-src:/application"
ports:
- "3000:3000"
command: >
sh -c "npm install &&
npm run start"
hostname: beta
php-fpm:
build: phpdocker/php-fpm
working_dir: /application
volumes:
- "./:/application"
- "./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.4/fpm/conf.d/99-overrides.ini"
command: /bin/sh -c "install/gamemaster-entrypoint.sh > /application/gamemaster-entrypoint.txt"
depends_on:
- "mariadb"
hostname: php-fpm
#environment:
# PHP_IDE_CONFIG: "serverName=Docker"
# XDEBUG_MODE: debug
# XDEBUG_CONFIG: client_host=host.docker.internal client_port=9003
# XDEBUG_SESSION: 1
soketi:
container_name: "webdiplomacy-websocket"
restart: unless-stopped
image: "quay.io/soketi/soketi:1.0-16-debian"
ports:
- "${SOKETI_PORT:-6001}:6001"
- "${SOKETI_METRICS_SERVER_PORT:-9601}:9601"
environment:
- SOKETI_DEBUG=${SOKETI_DEBUG:-1}
- SOKETI_DEFAULT_APP_ID=${SOKETI_DEFAULT_APP_ID:-app-id}
- SOKETI_DEFAULT_APP_KEY=${SOKETI_DEFAULT_APP_KEY:-app-key}
- SOKETI_DEFAULT_APP_SECRET=${SOKETI_DEFAULT_APP_SECRET:-app-secret}
- USER_AUTHENTICATION_TIMEOUT=${SOKETI_USER_AUTHENTICATION_TIMEOUT:-5000}
hostname: soketi
# Philip Paquette's publically available no-press bot docker image. Note this is not started by default as it uses a lot of resources and may not be
# relevant to all development situations.
bots:
profiles: ["bots"]
image: 'public.ecr.aws/n4k3z7o3/webdiplomacy:latest'
restart: always
environment:
- API_WEBDIPLOMACY=http://webserver/api.php
- API_KEY_CD_01=bot2
- API_KEY_USER_01=bot2
- API_KEY_USER_02=bot3
- API_KEY_USER_03=bot4
- API_KEY_USER_04=bot5
- API_KEY_USER_05=bot6
- API_KEY_USER_06=bot7
#- API_KEY_USER_07=bot7
hostname: bots