first sync
Some checks failed
Deployment Verification / deploy-and-test (push) Failing after 5m35s

This commit is contained in:
2024-12-23 19:01:46 +01:00
parent de81e08086
commit 92fd0f9d47
10 changed files with 597 additions and 30 deletions

View File

@ -1,42 +1,75 @@
#### NETWORKS
### networks
networks:
traefik_front_network:
external: true
back_network_:
back_network:
driver: bridge
attachable: true
front_network:
driver: bridge
attachable: true
#### SERVICES
### Volumes
#volumes:
# traefik-logs:
### services
services:
### hello_world
hello_world:
container_name: gitea-app
hostname: gitea-app
image: hello-world
environment:
# traefik
traefik:
container_name: traefik-app
hostname: traefik-app
image: traefik:latest
restart: always
networks:
# - back_network_gitea
- traefik_front_network
ports:
# - "22:22"
- "80:80"
- "443:443"
- "8181:8181"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/etc/localtime:/etc/localtime:ro"
- "./configs/traefik.yml:/etc/traefik/traefik.yml"
- "./configs/dynamic:/etc/traefik/dynamic:rw"
# - "./certificates/acme.json:/etc/traefik/acme/acme.json:rw"
- "./certificates:/var/traefik/certs:rw"
- "./certificates:/etc/traefik/ssl:rw"
- "./logs:/var/log/traefik:rw"
environment:
- CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}
networks:
- back_network
- front_network
### Certificats
certificat:
container_name: traefik-certificat
hostname: traefik-certificat
image: alpine:latest
command: sh -c "cd /etc/traefik/ssl
&& wget traefik.me/cert.pem -O cert2.pem
&& wget traefik.me/privkey.pem -O privkey2.pem"
volumes:
- "./certificates:/etc/traefik/ssl"
networks:
- front_network
# whoami
whoami:
container_name: traefik-whoami
hostname: traefik-whoami
image: traefik/whoami:latest
restart: unless-stopped
networks:
- front_network
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_front_network"
- "traefik.docker.network=front_network"
# HTTP
- "traefik.http.routers.hello-world-http.rule=Host(`hello-world.tips-of-mine.com`)"
- "traefik.http.routers.hello-world-http.entrypoints=http"
- "traefik.http.routers.hello-world-http.priority=49"
- "traefik.http.routers.whoami-http.rule=Host(`whoami.tips-of-mine.com`)"
- "traefik.http.routers.whoami-http.entrypoints=http"
# HTTPS
- "traefik.http.routers.hello-world-https.rule=Host(`hello-world.tips-of-mine.com`)"
- "traefik.http.routers.hello-world-https.entrypoints=https"
- "traefik.http.routers.hello-world-https.tls=true"
- "traefik.http.routers.hello-world-https.priority=50"
- "traefik.http.routers.gitea.service=gitea-https-service"
- "traefik.http.routers.whoami-https.rule=Host(`whoami.tips-of-mine.com`)"
- "traefik.http.routers.whoami-https.entrypoints=https"
- "traefik.http.routers.whoami-https.tls=true"
# Middleware
# Service
# - "traefik.http.services.gitea-https-service.loadbalancer.server.port=3000"
# - "traefik.http.services.gitea-https-service.loadbalancer.server.scheme=https"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.hostname=gitea.traefik.me"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.method=foobar"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.timeout=10"
# - "traefik.http.services.gitea-https-service.loadbalancer.healthcheck.interval=30"