Created
November 29, 2019 19:55
-
-
Save alexjj/15019715815529cf73bcea5c9c59ba92 to your computer and use it in GitHub Desktop.
Sample docker-compose with Traefik v2.0 and Lets Encrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
bitwarden: | |
image: bitwardenrs/server:latest | |
container_name: bitwarden | |
volumes: | |
- /home/alex/docker/bitwarden:/data | |
restart: unless-stopped | |
environment: | |
WEBSOCKET_ENABLED: "true" | |
SIGNUPS_ALLOWED: "true" | |
logging: | |
driver: "json-file" | |
options: | |
max-size: "10m" | |
max-file: "1" | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.bitwarden.rule=Host(`bitwarden.alexjj.com`)" | |
- "traefik.http.routers.bitwarden.entrypoints=websecure" | |
- "traefik.http.routers.bitwarden.tls.certresolver=myhttpchallenge" | |
traefik: | |
image: traefik:v2.0 | |
container_name: traefik | |
command: | |
- "--api.insecure=true" | |
- "--providers.docker=true" | |
- "--providers.docker.exposedbydefault=false" | |
- "--entrypoints.web.address=:80" | |
- "--entrypoints.websecure.address=:443" | |
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge=true" | |
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge.entrypoint=web" | |
- "--certificatesresolvers.myhttpchallenge.acme.email=alexjj@gmail.com" | |
- "--certificatesresolvers.myhttpchallenge.acme.storage=/letsencrypt/acme.json" | |
ports: | |
- "80:80" | |
- "8080:8080" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- /home/alex/docker/letsencrypt:/letsencrypt | |
restart: unless-stopped | |
logging: | |
driver: "json-file" | |
options: | |
max-size: "10m" | |
max-file: "1" |
Would you please be able to provide some guidance on what is in the
/home/alex/docker/bitwarden
directory that is used in the bitwarden volume?
Nothing. This is where bitwarden saves the database and files, so this is what you can backup to safe keep your data.
Would you please be able to provide some guidance on what is in the
/home/alex/docker/bitwarden
directory that is used in the bitwarden volume?Nothing. This is where bitwarden saves the database and files, so this is what you can backup to safe keep your data.
Ah ok that makes sense. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would you please be able to provide some guidance on what is in the
/home/alex/docker/bitwarden
directory that is used in the bitwarden volume?