From 4116f9fc1ddae6404353b703f460e754ec70faf3 Mon Sep 17 00:00:00 2001 From: sporada Date: Thu, 25 Mar 2021 14:45:24 +0100 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9Ewordpress?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wordpress/docker-compose.yml | 46 ++++++++++++++++++++++++++++++++++++ wordpress/live.env.tpl | 15 ++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 wordpress/docker-compose.yml create mode 100644 wordpress/live.env.tpl diff --git a/wordpress/docker-compose.yml b/wordpress/docker-compose.yml new file mode 100644 index 0000000..968bd9d --- /dev/null +++ b/wordpress/docker-compose.yml @@ -0,0 +1,46 @@ +version: '3.5' + +networks: + default: + external: + name: traefik_default + +services: + wordpress: + env_file: live.env + image: wordpress + container_name: wordpress-app + restart: unless-stopped + labels: + # Watchtower + - "com.centurylinklabs.watchtower.enable=true" + - "traefik.enable=true" + ### ### + - "traefik.http.routers.wordpress.entrypoints=websecure" + #- "traefik.http.routers.wordpress.middlewares=hsts-header@file" + - "traefik.http.routers.wordpress.rule=Host(`${DOMAIN}`)" + - "traefik.http.routers.wordpress.tls=true" + - "traefik.http.routers.wordpress.tls.certresolver=myresolver" + #- "traefik.http.routers.wordpress.tls.options=intermediate@file" + ### ### + networks: + - default + volumes: + - ${WORDPRESS_ROOT}/data/wordpress/usr/local/etc/php/conf.d/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini + - ${WORDPRESS_ROOT}/data/wordpress/var/www/html:/var/www/html + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + + db: + env_file: live.env + image: mysql:5.7 + restart: unless-stopped + container_name: wordpress-db + labels: + # Watchtower + - "com.centurylinklabs.watchtower.enable=true" + networks: + - default + volumes: + - ${WORDPRESS_ROOT}/db/var/lib/mysql:/var/lib/mysql + diff --git a/wordpress/live.env.tpl b/wordpress/live.env.tpl new file mode 100644 index 0000000..48f0a23 --- /dev/null +++ b/wordpress/live.env.tpl @@ -0,0 +1,15 @@ +# Domain +DOMAIN=domain.com + +# Wordpress +WORDPRESS_ROOT=/home/compute/services/wordpress +WORDPRESS_DB_HOST=db +WORDPRESS_DB_USER=username +WORDPRESS_DB_PASSWORD=password_db +WORDPRESS_DB_NAME=wordpress + +# DB +MYSQL_DATABASE=wordpress +MYSQL_USER=username +MYSQL_PASSWORD=password_db +MYSQL_RANDOM_ROOT_PASSWORD=password_db_root