From 2574a9e63ae65b25735ed50ede8095194fc077a0 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 4 Jan 2020 16:07:31 +0100 Subject: [PATCH] docker-compose for prod --- docker-compose.prod.yml | 35 +++++++++++++++++++++++++++++++++++ docker-compose.yml | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 docker-compose.prod.yml diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100755 index 0000000..535fb93 --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,35 @@ +version: '3.7' + +x-default: &default + restart: unless-stopped + env_file: .env + +networks: + traefik: + external: true + +services: + wp: + <<: *default + build: . + volumes: + - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro + - ./data/wp:/var/www/html + - ./liquet:/var/www/html/wp-content/themes/liquet:ro + ports: + - 80 + networks: + - default + - traefik + labels: + - traefik.enable=true + - traefik.port=80 + - traefik.docker.network=traefik + - traefik.backend=blog + - traefik.frontend.rule=Host:blog.nicco.io + + db: + <<: *default + image: mariadb:10.3 + volumes: + - ./data/db:/var/lib/mysql diff --git a/docker-compose.yml b/docker-compose.yml index 25de1c7..8bb8117 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.7' x-default: &default - restart: always + restart: unless-stopped env_file: .env services: