initial working docker-compose for version 1.1.2

main
Mi Klo 2023-03-08 21:04:22 +01:00
rodzic b7c1ba1510
commit 681af64b92
1 zmienionych plików z 132 dodań i 0 usunięć

Wyświetl plik

@ -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