51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
up () {
|
||
|
docker run \
|
||
|
--detach \
|
||
|
--name pretalx-db \
|
||
|
--restart unless-stopped \
|
||
|
--env MYSQL_DATABASE=pretalx_db \
|
||
|
--env MYSQL_USER=pretalx_user \
|
||
|
--env MYSQL_PASSWORD=pretalx_pw \
|
||
|
--env MYSQL_RANDOM_ROOT_PASSWORD=1 \
|
||
|
--volume /mammoth/pretalx/mysql:/var/lib/mysql:rw \
|
||
|
--network pew-net \
|
||
|
mysql:8 mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||
|
|
||
|
docker run \
|
||
|
--detach \
|
||
|
--name pretalx-redis \
|
||
|
--restart unless-stopped \
|
||
|
--volume /mammoth/pretalx/redis:/data:rw \
|
||
|
--network pew-net \
|
||
|
redis:7
|
||
|
|
||
|
echo 'Waiting 5 seconds for mysql to start up...'
|
||
|
sleep 5
|
||
|
# Exposed on port 80 in pew-net
|
||
|
docker run \
|
||
|
--detach \
|
||
|
--name pretalx \
|
||
|
--restart unless-stopped \
|
||
|
--volume /mammoth/pretalx/pretalx.cfg:/etc/pretalx/pretalx.cfg:ro \
|
||
|
--volume /mammoth/pretalx/data:/data:rw \
|
||
|
--volume /mammoth/pretalx/public:/public:rw \
|
||
|
--network pew-net \
|
||
|
pretalx/standalone:v2024.1.0
|
||
|
}
|
||
|
|
||
|
down () {
|
||
|
docker stop pretalx || true
|
||
|
docker rm pretalx || true
|
||
|
docker stop pretalx-db || true
|
||
|
docker rm pretalx-db || true
|
||
|
docker stop pretalx-redis || true
|
||
|
docker rm pretalx-redis || true
|
||
|
}
|
||
|
|
||
|
|
||
|
$@
|