Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.9'
- services:
- vault_db:
- image: mariadb
- container_name: vaultwarden_db
- hostname: vaultwarden_db
- restart: always
- environment:
- - MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- - MARIADB_DATABASE=${MARIADB_DATABASE}
- - MARIADB_USER=${MARIADB_USER}
- - MARIADB_PASSWORD=${MARIADB_PASSWORD}
- volumes:
- - vault_db_vol:/var/lib/mysql
- - /etc/localtime:/etc/localtime:ro
- networks:
- default:
- ports:
- - 3307:3306
- vaultwarden:
- image: vaultwarden/server:latest
- container_name: vaultwarden
- restart: unless-stopped
- env_file:
- - .env
- environment:
- - DATABASE_URL=${DB_URL}
- - LOG_LEVEL=info
- - TZ=Europe/Berlin
- - WEBSOCKET_ENABLED=${WEBSOCKET}
- - ADMIN_TOKEN=${TOKEN}
- - SMTP_FROM_NAME=${SMTP_FROM_NAME}
- - SMTP_HOST=${SMTP_HOST}
- - SMTP_FROM=${SMTP_FROM}
- - SMTP_PORT=${SMTP_PORT}
- - SMTP_SSL=${SMTP_SSL}
- - SMTP_SECURITY=${SMTP_SECURITY}
- - SMTP_USERNAME=${SMTP_USERNAME}
- - SMTP_PASSWORD=${SMTP_PASSWORD}
- - SIGNUPS_VERIFY=true
- - LOG_FILE=/var/log/vaultwarden.log
- - DOMAIN=${DOMAIN}
- - EMAIL=${EMAIL}
- - RUST_BACKTRACE=1
- - SIGNUPS_ALLOWED=false
- - INVITATIONS_ALLOWED=false
- labels:
- - "traefik.enable=true"
- - "traefik.http.routers.vaultwarden.entrypoints=http"
- - "traefik.http.routers.vaultwarden.rule=Host(`vaultwarden.example.me`)"
- - "traefik.http.middlewares.vaultwarden-https-redirect.redirectscheme.scheme=https"
- - "traefik.http.routers.vaultwarden.middlewares=vaultwarden-https-redirect"
- - "traefik.http.routers.vaultwarden-secure.entrypoints=https"
- - "traefik.http.routers.vaultwarden-secure.rule=Host(`vaultwarden.example.me`)"
- - "traefik.http.routers.vaultwarden-secure.tls=true"
- - "traefik.http.routers.vaultwarden-secure.tls.certresolver=http"
- - "traefik.http.routers.vaultwarden-secure.service=vaultwarden"
- - "traefik.http.services.vaultwarden.loadbalancer.server.port=80"
- - "traefik.docker.network=proxy"
- - "traefik.http.routers.vaultwarden-secure.middlewares=secHeaders@file"
- ports:
- - 3112:3012
- - 9380:80
- - 9343:443
- volumes:
- - type: bind
- source: /opt/containers/vaultwarden/data
- target: /data/
- networks:
- proxy:
- ipv4_address: 172.18.0.250
- default:
- networks:
- proxy:
- name: proxy
- driver: bridge
- attachable: true
- ipam:
- driver: default
- config:
- - subnet: 172.18.0.0/24
- gateway: 172.18.0.1
- default: {}
- volumes:
- vault_db_vol:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement