Files
sternwarte_server/docker-compose.yml
2025-11-02 22:52:08 +01:00

53 lines
1.6 KiB
YAML

services:
nginx:
image: nginx:1.27
container_name: sternwarte-nginx
depends_on:
- php
env_file:
- ./html/.env
volumes:
- ${PWD}/html:/var/www/html
- ${PWD}/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ${PWD}/.htpasswd:/etc/nginx/.htpasswd:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.sternwarte.entrypoints=http"
- "traefik.http.routers.sternwarte.rule=Host(`${MAIN_HOST}`)"
- "traefik.http.middlewares.sternwarte-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.sternwarte.middlewares=sternwarte-https-redirect"
- "traefik.http.routers.sternwarte-secure.entrypoints=https"
- "traefik.http.routers.sternwarte-secure.rule=Host(`${MAIN_HOST}`)"
- "traefik.http.routers.sternwarte-secure.tls=true"
- "traefik.http.routers.sternwarte-secure.tls.certresolver=letsencrypt"
- "traefik.http.routers.sternwarte-secure.service=sternwarte"
- "traefik.http.services.sternwarte.loadbalancer.server.port=80"
- "traefik.docker.network=traefik_und_portainer_start_proxy"
networks:
- proxy
- internal
php:
build: ./php
container_name: sternwarte-php
env_file:
- ./html/.env
volumes:
- ${PWD}/html:/var/www/html
- ${PWD}/php/php.ini:/usr/local/etc/php/conf.d/custom.ini
- ${PWD}/php/my.cnf:/etc/mysql/conf.d/my.cnf:ro
environment:
- DEVELOP=true
networks:
- proxy
- internal
networks:
proxy:
name: traefik_und_portainer_start_proxy
external: true
internal:
name: gitea_gitea-internal
external: true