|
|
@ -0,0 +1,58 @@ |
|
|
|
version: '3.8' |
|
|
|
|
|
|
|
services: |
|
|
|
traefik_proxy: |
|
|
|
image: traefik:2.5 |
|
|
|
container_name: traefik_proxy |
|
|
|
restart: unless-stopped |
|
|
|
security_opt: |
|
|
|
- no-new-privileges:true |
|
|
|
command: |
|
|
|
- "--log.level=DEBUG" |
|
|
|
- "--providers.docker=true" |
|
|
|
- "--providers.docker.exposedbydefault=false" |
|
|
|
- "--entrypoints.web.address=:80" |
|
|
|
- "--entrypoints.websecure.address=:443" |
|
|
|
- "--entrypoints.web.http.redirections.entryPoint.to=websecure" |
|
|
|
- "--entrypoints.web.http.redirections.entryPoint.scheme=https" |
|
|
|
- "--certificatesresolvers.myresolver.acme.httpchallenge=true" |
|
|
|
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web" |
|
|
|
- "--certificatesresolvers.myresolver.acme.email=alexandra.hosp@protonmail.com" |
|
|
|
- "--certificatesresolvers.myresolver.acme.storage=acme.json" |
|
|
|
ports: |
|
|
|
- 80:80 |
|
|
|
- 443:443 |
|
|
|
networks: |
|
|
|
- proxy |
|
|
|
volumes: |
|
|
|
- ./acme/acme.json:/acme.json |
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro |
|
|
|
|
|
|
|
|
|
|
|
rust_server: |
|
|
|
build: ./apps/cannabinieri_web |
|
|
|
container_name: rust_server |
|
|
|
restart: always |
|
|
|
labels: |
|
|
|
- "traefik.docker.network=proxy" |
|
|
|
- "traefik.enable=true" |
|
|
|
# - "traefik.protocol=http" |
|
|
|
- "traefik.port=5000" |
|
|
|
- "traefik.http.routers.rust_server.entrypoints=websecure" |
|
|
|
- "traefik.http.routers.rust_server.tls=true" |
|
|
|
- "traefik.http.routers.rust_server.tls.certresolver=myresolver" |
|
|
|
- "traefik.http.routers.rust_server.rule=Host(`cyberpreneur.net`)" |
|
|
|
environment: |
|
|
|
- RUST_BACKTRACE=full |
|
|
|
networks: |
|
|
|
- proxy |
|
|
|
|
|
|
|
ports: |
|
|
|
- "5000:5000" |
|
|
|
|
|
|
|
networks: |
|
|
|
proxy: |
|
|
|
external: true |
|
|
|
|
|
|
|
|
|
|
|
|