From 681af64b9214a36e5e36f1571250d3f44068e9f7 Mon Sep 17 00:00:00 2001 From: Mi Klo Date: Wed, 8 Mar 2023 21:04:22 +0100 Subject: [PATCH] initial working docker-compose for version 1.1.2 --- castopod/docker-compose.yml | 132 ++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 castopod/docker-compose.yml diff --git a/castopod/docker-compose.yml b/castopod/docker-compose.yml new file mode 100644 index 0000000..6420be7 --- /dev/null +++ b/castopod/docker-compose.yml @@ -0,0 +1,132 @@ +version: "3.7" + +services: + app: + image: castopod/app:${IMAGE_VERSION} + container_name: "castopod-app" + volumes: + - media:/opt/castopod/public/media + environment: +# MYSQL_HOST: db + MYSQL_DATABASE: castopod + MYSQL_USER: castopod + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + CP_BASEURL: "https://pod.citizen4.eu" + CP_ANALYTICS_SALT: ${CP_ANALYTICS_SALT} + CP_CACHE_HANDLER: redis + CP_REDIS_HOST: redis + networks: + - web + - int + restart: unless-stopped + + web: + image: castopod/web-server:${IMAGE_VERSION} + container_name: "castopod-web-server" + volumes: + - media:/var/www/html/media + networks: + - web + - int + ports: + - 80 + restart: unless-stopped + deploy: + mode: replicated + replicas: 1 + resources: + limits: + cpus: '2.0' + memory: 2048M + labels: + - "traefik.enable=true" + - "traefik.docker.network=web" + - "traefik.http.routers.podcast.rule=Host(`pod.citizen4.eu`)" + - "traefik.http.routers.podcast.entrypoints=websecure" + - "traefik.http.routers.podcast.service=podcast" + - "traefik.http.services.podcast.loadbalancer.server.port=80" + - "traefik.http.routers.podcast.tls=true" + - "traefik.http.routers.podcast.tls.certresolver=ovh" + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "5" + + mariadb: + image: mariadb:10.5 + container_name: "castopod-mariadb" + networks: + - int + volumes: + - db:/var/lib/mysql + environment: + MYSQL_DATABASE: castopod + MYSQL_USER: castopod + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + restart: unless-stopped + deploy: + resources: + limits: + cpus: '2.0' + memory: 1024M + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "5" + + redis: + image: redis:7.0-alpine + container_name: "castopod-redis" + volumes: + - cache:/data + networks: + - web + deploy: + mode: replicated + replicas: 1 + resources: + limits: + cpus: '1.0' + memory: 512M + + # this container is optional + # add this if you want to use the videoclips feature + video-clipper: + image: castopod/video-clipper:${IMAGE_VERSION} + container_name: "castopod-video-clipper" + volumes: + - media:/opt/castopod/public/media + environment: +# MYSQL_HOST: db + MYSQL_DATABASE: castopod + MYSQL_USER: castopod + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + + networks: + - int + restart: unless-stopped + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "5" + +volumes: + media: + db: + cache: + +networks: + int: +# create network web: $ docker network create --scope swarm --attachable -d 'overlay' web + web: + external: + name: web