Skip to content

Commit

Permalink
Use images as described in #209
Browse files Browse the repository at this point in the history
  • Loading branch information
marein committed Aug 3, 2024
1 parent 9d2bb82 commit 7fb0174
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 57 deletions.
4 changes: 2 additions & 2 deletions deploy/load-test/stack/app.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
APP_ENVIRONMENT=prod
APP_KERNEL_SECRET=ThisTokenIsNotSoSecretChangeIt
APP_WAIT_FOR=unix:///var/run/proxysql/proxysql.sock,chat-mysql:3306,connect-four-mysql-1:3306,connect-four-mysql-2:3306,connect-four-mysql-3:3306,connect-four-mysql-4:3306,connect-four-mysql-5:3306,identity-mysql:3306,chat-redis:6379,connect-four-redis:6379,web-interface-redis:6379,rabbit-mq:5672,nchan:81
APP_RABBIT_MQ_DSN=amqp://guest:guest@rabbit-mq:5672?heartbeat=60&prefetchCount=30
APP_WAIT_FOR=unix:///var/run/proxysql/proxysql.sock,chat-mysql:3306,connect-four-mysql-1:3306,connect-four-mysql-2:3306,connect-four-mysql-3:3306,connect-four-mysql-4:3306,connect-four-mysql-5:3306,identity-mysql:3306,chat-redis:6379,connect-four-redis:6379,web-interface-redis:6379,rabbitmq:5672,nchan:81
APP_RABBIT_MQ_DSN=amqp://guest:guest@rabbitmq:5672?heartbeat=60&prefetchCount=30

APP_CHAT_DOCTRINE_DBAL_URL=mysqli://root:password@localhost/chat?persistent=1&unix_socket=/var/run/proxysql/proxysql.sock
APP_CHAT_RUN_MIGRATIONS=1
Expand Down
5 changes: 1 addition & 4 deletions deploy/load-test/stack/chat/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ version: '3.4'

services:
chat-mysql:
image: marein/php-gaming-website:mysql
command: mysqld --max-connections=1000
environment:
MYSQL_ROOT_PASSWORD: password
image: ghcr.io/gaming-platform/docker-mysql:8.2
volumes:
- chat-mysql:/var/lib/mysql
deploy:
Expand Down
3 changes: 1 addition & 2 deletions deploy/load-test/stack/chat/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ version: '3.4'

services:
chat-redis:
image: marein/php-gaming-website:redis
command: redis-server --appendonly yes
image: ghcr.io/gaming-platform/docker-redis:7.2
volumes:
- chat-redis:/data
deploy:
Expand Down
5 changes: 1 addition & 4 deletions deploy/load-test/stack/connect-four/mysql-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ version: '3.4'

services:
connect-four-mysql-1:
image: marein/php-gaming-website:mysql
command: mysqld --max-connections=1000
environment:
MYSQL_ROOT_PASSWORD: password
image: ghcr.io/gaming-platform/docker-mysql:8.2
volumes:
- connect-four-mysql-1:/var/lib/mysql
deploy:
Expand Down
5 changes: 1 addition & 4 deletions deploy/load-test/stack/connect-four/mysql-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ version: '3.4'

services:
connect-four-mysql-2:
image: marein/php-gaming-website:mysql
command: mysqld --max-connections=1000
environment:
MYSQL_ROOT_PASSWORD: password
image: ghcr.io/gaming-platform/docker-mysql:8.2
volumes:
- connect-four-mysql-2:/var/lib/mysql
deploy:
Expand Down
5 changes: 1 addition & 4 deletions deploy/load-test/stack/connect-four/mysql-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ version: '3.4'

services:
connect-four-mysql-3:
image: marein/php-gaming-website:mysql
command: mysqld --max-connections=1000
environment:
MYSQL_ROOT_PASSWORD: password
image: ghcr.io/gaming-platform/docker-mysql:8.2
volumes:
- connect-four-mysql-3:/var/lib/mysql
deploy:
Expand Down
5 changes: 1 addition & 4 deletions deploy/load-test/stack/connect-four/mysql-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ version: '3.4'

services:
connect-four-mysql-4:
image: marein/php-gaming-website:mysql
command: mysqld --max-connections=1000
environment:
MYSQL_ROOT_PASSWORD: password
image: ghcr.io/gaming-platform/docker-mysql:8.2
volumes:
- connect-four-mysql-4:/var/lib/mysql
deploy:
Expand Down
5 changes: 1 addition & 4 deletions deploy/load-test/stack/connect-four/mysql-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ version: '3.4'

services:
connect-four-mysql-5:
image: marein/php-gaming-website:mysql
command: mysqld --max-connections=1000
environment:
MYSQL_ROOT_PASSWORD: password
image: ghcr.io/gaming-platform/docker-mysql:8.2
volumes:
- connect-four-mysql-5:/var/lib/mysql
deploy:
Expand Down
3 changes: 1 addition & 2 deletions deploy/load-test/stack/connect-four/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ version: '3.4'

services:
connect-four-redis:
image: marein/php-gaming-website:redis
command: redis-server --appendonly yes
image: ghcr.io/gaming-platform/docker-redis:7.2
volumes:
- connect-four-redis:/data
deploy:
Expand Down
5 changes: 1 addition & 4 deletions deploy/load-test/stack/identity/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ version: '3.4'

services:
identity-mysql:
image: marein/php-gaming-website:mysql
command: mysqld --max-connections=1000
environment:
MYSQL_ROOT_PASSWORD: password
image: ghcr.io/gaming-platform/docker-mysql:8.2
volumes:
- identity-mysql:/var/lib/mysql
deploy:
Expand Down
13 changes: 3 additions & 10 deletions deploy/load-test/stack/observability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,16 @@ version: '3.4'

services:
grafana:
image: marein/php-gaming-website:grafana
environment:
GF_AUTH_DISABLE_LOGIN_FORM: 1
GF_AUTH_ANONYMOUS_ENABLED: 1
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
image: ghcr.io/gaming-platform/docker-grafana:10.0
ports:
- "8083:3000"
deploy:
placement:
constraints:
- "node.labels.grafana==1"
prometheus:
image: marein/php-gaming-website:prometheus
user: root # Needed for accessing docker.sock. In prod, it may be handled via file permissions.
command:
- '--config.file=/etc/prometheus/prometheus-dockerswarm.yml'
- '--storage.tsdb.path=/prometheus'
image: ghcr.io/gaming-platform/docker-prometheus:2.45
command: --config.file=/etc/prometheus/dockerswarm.yml
volumes:
- prometheus:/prometheus
- /var/run/docker.sock:/var/run/docker.sock
Expand Down
6 changes: 3 additions & 3 deletions deploy/load-test/stack/proxysql-sidecar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ version: '3.4'

services:
proxysql-sidecar:
image: marein/php-gaming-website:proxysql
image: ghcr.io/gaming-platform/docker-proxysql:2.5
environment:
PROXYSQL_CONFIG: |
admin_variables: {
restapi_enabled="true"
hash_passwords="false"
}
mysql_variables: {
interfaces="/var/run/proxysql/proxysql.sock"
server_version="8.0"
server_version="8.2"
monitor_username="root"
monitor_password="password"
auto_increment_delay_multiplex=0
Expand Down Expand Up @@ -54,7 +55,6 @@ services:
labels:
- "prometheus-job=proxysql"
- "prometheus-port=6070"
- "prometheus-path=/metrics"

volumes:
proxysql.sock:
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
version: '3.4'

services:
rabbit-mq:
image: marein/php-gaming-website:rabbit-mq
hostname: rabbit-mq
rabbitmq:
image: ghcr.io/gaming-platform/docker-rabbitmq:3.12
hostname: rabbitmq
volumes:
- rabbit-mq:/var/lib/rabbitmq/mnesia
- rabbitmq:/var/lib/rabbitmq/mnesia
deploy:
placement:
constraints:
- "node.labels.rabbit-mq==1"
- "node.labels.rabbitmq==1"
labels:
- "prometheus-job=rabbitmq"
- "prometheus-port=15692"
- "prometheus-path=/metrics/per-object"

volumes:
rabbit-mq:
rabbitmq:
2 changes: 1 addition & 1 deletion deploy/load-test/stack/traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.4'

services:
traefik:
image: marein/php-gaming-website:traefik
image: traefik:2.10
command:
- --metrics.prometheus=true
- --providers.docker
Expand Down
4 changes: 3 additions & 1 deletion deploy/load-test/stack/web-interface/nchan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.4'

services:
nchan:
image: marein/php-gaming-website:nchan
image: ghcr.io/gaming-platform/docker-nchan:1.3
deploy:
placement:
constraints:
Expand All @@ -11,6 +11,8 @@ services:
- "traefik.enable=true"
- "traefik.http.routers.nchan.priority=20"
- "traefik.http.routers.nchan.rule=PathPrefix(`/sse`)"
- "traefik.http.routers.nchan.middlewares=nchan-stripprefix"
- "traefik.http.middlewares.nchan-stripprefix.stripprefix.prefixes=/sse"
- "traefik.http.services.nchan.loadbalancer.server.port=80"
- "prometheus-job=nchan"
- "prometheus-port=81"
3 changes: 1 addition & 2 deletions deploy/load-test/stack/web-interface/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ version: '3.4'

services:
web-interface-redis:
image: marein/php-gaming-website:redis
command: redis-server --appendonly yes
image: ghcr.io/gaming-platform/docker-redis:7.2
volumes:
- web-interface-redis:/data
deploy:
Expand Down

0 comments on commit 7fb0174

Please sign in to comment.