From 89e872f91fdbca117d01747e8d57f0242eff2b0c Mon Sep 17 00:00:00 2001 From: zino Date: Sun, 10 Dec 2023 16:35:25 +0100 Subject: [PATCH] m --- .gitignore | 5 ++++ docker-compose.yml | 52 +++++++++++++++++++++++++++++++++++++++++ secrets/db_password.txt | 1 + secrets/db_user.txt | 1 + volumes/.gitkeep | 0 volumes/uploads.ini | 5 ++++ 6 files changed, 64 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 secrets/db_password.txt create mode 100644 secrets/db_user.txt create mode 100644 volumes/.gitkeep create mode 100644 volumes/uploads.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c57f39 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything in the volume folder +volume/* + +# But not the .gitkeep file +!volume/.gitkeep \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c3a63da --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,52 @@ +version: "3.8" +services: + pokerstarsbot-wordpress: + image: wordpress:latest + container_name: pokerstarsbot-wordpress + restart: on-failure + environment: + WORDPRESS_DB_HOST: pokerstarsbot-wordpress-mariadb + WORDPRESS_DB_USER_FILE: /run/secrets/db_user + WORDPRESS_DB_PASSWORD_FILE: /run/secrets/db_password + WORDPRESS_DB_NAME: wp + WORDPRESS_DEBUG: 1 + depends_on: + - pokerstarsbot-wordpress-mariadb + volumes: + - ./volumes/wordpress:/var/www/html + - ./volumes/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini + secrets: + - db_user + - db_password + networks: + - web + + pokerstarsbot-wordpress-mariadb: + image: mariadb:latest + container_name: pokerstarsbot-wordpress-mariadb + restart: on-failure + environment: + MYSQL_DATABASE: wp + MYSQL_USER_FILE: /run/secrets/db_user + MYSQL_PASSWORD_FILE: /run/secrets/db_password + MYSQL_RANDOM_ROOT_PASSWORD: "1" + MYSQL_LOG_CONSOLE: "true" + TZ: "Europe/Berlin" + volumes: + - ./volumes/db:/var/lib/mysql + secrets: + - db_user + - db_password + networks: + - web + +networks: + web: + external: true + name: web + +secrets: + db_password: + file: ./secrets/db_password.txt + db_user: + file: ./secrets/db_user.txt diff --git a/secrets/db_password.txt b/secrets/db_password.txt new file mode 100644 index 0000000..9c2667c --- /dev/null +++ b/secrets/db_password.txt @@ -0,0 +1 @@ +ekUGB38YQ@q*xG8J \ No newline at end of file diff --git a/secrets/db_user.txt b/secrets/db_user.txt new file mode 100644 index 0000000..197c0eb --- /dev/null +++ b/secrets/db_user.txt @@ -0,0 +1 @@ +zino \ No newline at end of file diff --git a/volumes/.gitkeep b/volumes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/volumes/uploads.ini b/volumes/uploads.ini new file mode 100644 index 0000000..e2ec3c8 --- /dev/null +++ b/volumes/uploads.ini @@ -0,0 +1,5 @@ +file_uploads = On +memory_limit = 256M +upload_max_filesize = 128M +post_max_size = 128M +max_execution_time = 300