2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2024-11-15 23:09:24 +01:00
docker/.examples/docker-compose/with-traefik-proxy/mariadb-cron-smtp/fpm/docker-compose.yml

85 lines
1.7 KiB
YAML
Raw Normal View History

version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
app:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
- FRIENDICA_URL=
- FRIENDICA_SITENAME=
- SMTP=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
cron:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
env_file:
- db.env
depends_on:
- db
- app
hostname: friendica.local
web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
networks:
- default
- proxy-tier
labels:
- "traefik.backend=friendica"
- "traefik.frontend.entryPoints=https,http"
- "traefik.frontend.headers.STSSeconds=15768000"
- "traefik.frontend.headers.STSIncludeSubdomains=false"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.friendica.frontend.rule=Host:friendica.local"
- "traefik.friendica.frontend.port=80"
- "traefik.enable=true"
- "traefik.docker.network=proxy-tier"
proxy:
build: ./proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
container_name: traefik
networks:
- default
- proxy-tier
volumes:
db:
friendica:
networks:
proxy-tier: