Skip to content

Commit

Permalink
Update traefik configuration and remove unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne committed Jan 31, 2024
1 parent 464720d commit 4336184
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 52 deletions.
28 changes: 28 additions & 0 deletions cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN CERTIFICATE-----
MIIE3DCCAsQCCQDnJQvR73XJuTANBgkqhkiG9w0BAQsFADAwMQswCQYDVQQGEwJm
cjERMA8GA1UECAwIYmFzLXJoaW4xDjAMBgNVBAcMBXN0cmFzMB4XDTI0MDEzMTEy
NTYwMFoXDTI1MDEzMDEyNTYwMFowMDELMAkGA1UEBhMCZnIxETAPBgNVBAgMCGJh
cy1yaGluMQ4wDAYDVQQHDAVzdHJhczCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
AgoCggIBAJg2JL8H/j6mVM6aUQKw6+YvPPM115g/dqdydxikAVx1L7HcHq9iw7AA
QcvKqrWZaBkefV8fED58KaOrWm28UVj3icVBQELlc+RiGM6PXw7HiAJ5BoZQM62t
u1EKhdjdq6yb6pP3sfVmPJKXamqYcWFjaNtlkDUD38zFBfuru7APLPodjCBw++BF
MXKZZnTqG6w5ZcVJb8YA6xAGPR04Y2I8UTbbJOEB3tnAA/J517Q+esXyCeU8iFi9
Ofmj+Qp2a1ZVAgd8SKpi+vZax5OFVgZXrtvhAFAoVhh3ZNNbgOZ4ZYnGZHs9tbyf
fadHsGRSB88XYmFgcQrHJqcOMqlC9VthE7RIIW3n4rv5V8RlWpvwfroNGDSso3zJ
j0KDYw40Z2by2UBG+dumLcL7zP8JsGx/JsAB8/6YLzN0OsE1aNYsGLv1RIHECG43
mjghsBGqcUIOBo0gei+tEMAo9Zk+CKEHLZCzRBNUWaKo3Gu8vEhEZ/NlXz/cTcb4
w/BjsuUpI6/4/n9qgZSC4tybAS+OdD863RaDUCkQE0Yn+rtlWKqBNxJTr+T7FEtb
+4OyuqvO9WmvYxgtuVBMR0imRcrh7/Iks+3neiPhZairNMgR8sEv455EF6M5wY4o
DLZTgjvVHDZ0my2oKY4UmaUCOxB43eR9gDzg2QF2ylt9puXLi34TAgMBAAEwDQYJ
KoZIhvcNAQELBQADggIBAGZ7Z6NbAIIPrl5/G6WQQeP6H7lk9b3a2FAUpldhqHo5
Qc+M+OWnk0HfGeAChJzhhm07i1Y/kQN9HmoxClzKa5DaC97L/86Gr8qLoK7Y6Iof
l0eOPJFWGQspIcrniPvYrf03qBP9ZENBsiPhPzXRgUB+YankW9qGnJwKJl69SGo3
8BuJcE6RYovDEPprFFd2qZLAxjQQQMNyvV8sLQy9keX8rnVRrHtnEEVwg/40G/43
vnB/01SlppBL+aiuOl/cd/sKmJnZqbOvZyZt/FW06c/sN74EijXBJFKY7OleYsSn
szzy3Mg3dj/ln6wyC22Ct7sF7NCSHK7hw626yhgwoqy/r4luBj2qSi2kgJJH+yg9
Foi+YMtQvr1gs3syHMx5G7XDPiXypXRl74Vuj8pIfiN0NxkC0FOcEqivnM55yf9P
xPE3DoRDlLhPp2z2uORv9pXh+cNvV/NK5Y12T6/AWZLWDc1/cVEvN1l7nEX2vWqb
R3/GYnbHCY3z9DDRKa01ajc7/C6Dhrn7E006lfA4Gs0vZr+whApL1UkKn7H8wAxT
GOMGyhxVl08Fyjhs+KPvZ6q2yGXNutgOT+C6InzN+kG54hwEJM6WznaXp53+FQWZ
G3b+Ob+7JGunSHwAu1ff/kXVKzkSGmvgJ72almJbsKymZ70Z23cc+W3puVhECsdP
-----END CERTIFICATE-----
4 changes: 4 additions & 0 deletions certificates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tls:
certificates:
- certFile: /certs/cert.pem
keyFile: /certs/key.pem
37 changes: 14 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
version: "2"
services:
traefik:
restart: unless-stopped
image: traefik
container_name: traefik
image: traefik:v2.0.2
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--providers.file.filename=/etc/traefik/certificates.yml"
ports:
- "80:80"
- "443:443"
- "8080:8080"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
volumes:
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
- ./traefik/tls.yml:/etc/traefik/tls.yml
- /var/run/docker.sock:/var/run/docker.sock
- certs:/etc/ssl/traefik
- ./certificates.yml:/etc/traefik/certificates.yml
- ./key.pem:/certs/key.pem
- ./cert.pem:/certs/cert.pem
networks:
- web

Expand Down Expand Up @@ -53,26 +57,13 @@ services:
volumes:
- ./front:/app/src
labels:
- "traefik.http.routers.front.rule=Host(\"instantchat.${SITE_ADDRESS}.traekif.me\")"
- "traefik.http.routers.front-tls.tls.domains[0].main=instantchat.traefik.me"
- "traefik.http.routers.front-tls.tls.domains[0].sans=instantchat-*.traefik.me"
- "traefik.enable=true"
- "traefik.http.routers.front.rule=HostRegexp(`{any:.*}`)"
- "traefik.http.routers.front.entrypoints=websecure"
- "traefik.http.routers.front.tls=true"
- "traefik.http.services.front.loadbalancer.server.port=3000"
networks:
- web

reverse-proxy-https-helper:
image: alpine
command: sh -c "cd /etc/ssl/traefik
&& wget traefik.me/cert.pem -O cert.pem
&& wget traefik.me/privkey.pem -O privkey.pem"
volumes:
- certs:/etc/ssl/traefik
networks:
- web

networks:
web:

volumes:
certs:
52 changes: 52 additions & 0 deletions key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCYNiS/B/4+plTO
mlECsOvmLzzzNdeYP3ancncYpAFcdS+x3B6vYsOwAEHLyqq1mWgZHn1fHxA+fCmj
q1ptvFFY94nFQUBC5XPkYhjOj18Ox4gCeQaGUDOtrbtRCoXY3ausm+qT97H1ZjyS
l2pqmHFhY2jbZZA1A9/MxQX7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GZSXafI4NctBanSSyn7AKeB3UNxRwWLj8ksVb3+ragOJ0JKm
E/q81LcZDr8lBrVYxdVYd3Iy69n0idjWDyOrDw9hzFZwnN+3+6FAo23i4tz6ZltE
vEm06ksw20HLTuMsAjJ5G0yaUv3z7Jy86ilB1VkCggEBAIT0ax1VnCJ+zPqE41sg
EEj7s+fdkbMpQDBIubVdYb/U9DoGGunQJp6mc6g80p0hOAsBrlHqsH1IwtblESnO
nY57KuPa1CEA55O4n1fb6vH03pinq5XbIom8q9/aSQjy0T0xmQ9/3axTS4VDm6Q7
sN3VMKFPrxR4Kn/psuvL4HU05PebphTODdUTLYioKqFcOT1XvAdX14OI9iLpshwd
H1ddIxpgaR0mb258fomb2faksN6ZcXdWhufpdddTfpyKy3kgvhuzbjqdcvKiRQk4
OXaeJs0LX/TQKMg5cZn78F6hSVQC9WVNrAsTH2EVA0oFBHk67cd1fvLYnOpk9hYQ
vd8CggEBAK9RaVoPd1Tl1JIOJqVBdgJrTn6pWTKo+pf+svJiKTpAFu3ydwrFU0So
piygPRkYbEEFG+h0S/KzV7pifBrSImitRQvi55imCcXL+qhmgNmlALrO95+RJN/b
srMKyPrCoJZtcl8hbcg7KYntCpnZcvU8G1DxZqzxun7UR0XcrPOa3/oKKcVZNrnb
QiUxzCLz5QXt+dTq5myWaO7Z7WX5a7yvuBdOHj38jGYVvT6W/rAGmQL/m7EstamK
sn/2uZ9tI+PPwUDIBjtlsiE4Wv7G4LFsjFx6jwCaUkvE5fnU5Vs84eJOssTTwDTS
xJLD/iCOHRtF4UyQeo2Ao+Qklhw9CA0=
-----END PRIVATE KEY-----
9 changes: 0 additions & 9 deletions traefik/tls.yml

This file was deleted.

20 changes: 0 additions & 20 deletions traefik/traefik.yml

This file was deleted.

0 comments on commit 4336184

Please sign in to comment.