Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP docker-compose with tls #164

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions _traefik.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tls:
certificates:
- certFile: /certs/cert.pem
keyFile: /certs/key.pem
stores:
- default

stores:
default:
defaultCertificate:
certFile: /certs/cert.pem
keyFile: /certs/key.pem
58 changes: 58 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
version: "3"

services:
app:
image: "moksha:latest"
ports:
- 3338:3338
environment:
- MINT_APP_ENV=prod
- LND_MACAROON_PATH=/config/admin.macaroon
- LND_TLS_CERT_PATH=/config/tls.cert
- LND_GRPC_HOST=https://host.docker.internal:10001
env_file:
- .env
volumes:
- type: bind
source: "${LND_MACAROON_PATH}"
target: "/config/admin.macaroon"
- type: bind
source: "${LND_TLS_CERT_PATH}"
target: "/config/tls.cert"
labels:
- traefik.http.routers.hello.rule=Host(`webdev.local`)
- traefik.http.routers.hello.tls=true
- traefik.http.routers.hello.tls.certresolver=myresolver
- traefik.http.routers.hello.tls.domains[0].main=webdev.local
- traefik.http.routers.hello.tls.domains[0].sans=*.webdev.local
- traefik.http.routers.hello.entrypoints=websecure
traefik:
image: traefik:v2.3
command:
- --log.level=INFO
- --api.insecure=false
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --providers.docker

volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/certs:/etc/traefik/certs:ro
- ./_traefik.yml:/etc/traefik/dynamic_conf/conf.yml:ro
ports:
- "80:80"
- "443:443"

certresolver:
image: traefik:v2.3
command:
#- storeconfig
- --providers.docker
- --providers.docker.exposedbydefault=false
- --providers.file.directory=/etc/traefik/dynamic_conf
- --providers.file.watch=true
volumes:
- ./_traefik.yml:/etc/traefik/dynamic_conf/conf.yml:ro
- ./data/certs:/etc/traefik/certs:ro
labels:
- traefik.enable=false
Loading