diff --git a/jafner-chat/config/nginx/docker-compose.yml b/jafner-chat/config/nginx/docker-compose.yml new file mode 100644 index 0000000..bfb963b --- /dev/null +++ b/jafner-chat/config/nginx/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' +services: + nginx: + image: nginx + container_name: nginx_test + networks: + - web + labels: + - traefik.http.routers.nginx.rule=Host(`test.jafner.chat`) + - traefik.http.routers.nginx.tls.certresolver=lets-encrypt + +networks: + web: + external: true diff --git a/jafner-chat/config/traefik/.env b/jafner-chat/config/traefik/.env new file mode 100644 index 0000000..6655710 --- /dev/null +++ b/jafner-chat/config/traefik/.env @@ -0,0 +1 @@ +DOCKER_DATA=/home/joey/data/traefik diff --git a/jafner-chat/config/traefik/docker-compose.yml b/jafner-chat/config/traefik/docker-compose.yml new file mode 100644 index 0000000..57cea00 --- /dev/null +++ b/jafner-chat/config/traefik/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3" + +services: + traefik: + image: traefik:latest + container_name: traefik_traefik + restart: "no" + networks: + - web + ports: + - 80:80 + - 443:443 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - ./traefik.yaml:/traefik.yaml + - ./config:/config + - $DOCKER_DATA/acme.json:/acme.json + +networks: + web: + external: true diff --git a/jafner-chat/config/traefik/traefik.yml b/jafner-chat/config/traefik/traefik.yml new file mode 100644 index 0000000..29ad0da --- /dev/null +++ b/jafner-chat/config/traefik/traefik.yml @@ -0,0 +1,32 @@ +entryPoints: + web: + address: :80 + http: + redirections: + entryPoint: + to: websecure + scheme: https + websecure: + address: :443 + +metrics: + prometheus: {} + +certificatesResolvers: + lets-encrypt: + acme: + email: jafner425@gmail.com + storage: acme.json + tlsChallenge: {} + +api: + insecure: true + dashboard: true + +providers: + docker: + watch: true + network: web + file: + directory: /config +