63 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
		
			Executable File
		
	
	
	
	
| version: '3'
 | |
| 
 | |
| services:
 | |
|  bitwarden:
 | |
|   image: vaultwarden/server
 | |
|   hostname: bitwarden
 | |
|   restart: always
 | |
|   expose:
 | |
|    - "80"
 | |
|   volumes:
 | |
|    - ./vw-data:/data
 | |
|   environment:
 | |
|    WEBSOCKET_ENABLED: 'true'
 | |
|    SIGNUPS_ALLOWED: 'false'
 | |
|    ADMIN_TOKEN: 'hellofriend'
 | |
|    LOG_FILE: ./data/vaultwarden.log
 | |
| 
 | |
|  nginx:
 | |
|   image: nginx:1.15-alpine
 | |
|   restart: always
 | |
|   ports:
 | |
|    - "80:80"
 | |
|    - "443:443"
 | |
|   volumes:
 | |
|    - ./data/nginx:/etc/nginx
 | |
|    - ./data/ssl:/etc/ssl
 | |
|    - ./data/certbot/conf:/etc/letsencrypt
 | |
|    - ./data/certbot/www:/var/www/certbot
 | |
|    - ./data/dummyssl:/etc/dummyssl
 | |
|   command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
 | |
| 
 | |
|  bw_backup:
 | |
|   image: bruceforce/bw_backup:latest
 | |
|   container_name: bw_backup
 | |
|   restart: on-failure
 | |
|   depends_on:
 | |
|    - bitwarden
 | |
|   volumes:
 | |
|    - ./data/bitwarden:/data
 | |
|    - /etc/timezone:/etc/timezone:ro
 | |
|    - /etc/localtime:/etc/localtime:ro
 | |
|   environment:
 | |
|    - DB_FILE=/data/db.sqlite3
 | |
|    - BACKUP_FILE=/data/db_backup/bwbackup.sqlite3
 | |
|    - CRON_TIME= 10 * * * *
 | |
|    - TIMESTAMP=true
 | |
|    - UID=0
 | |
|    - GID=0
 | |
|    - ./data/ssl:/etc/ssl
 | |
|    - ./data/certbot/conf:/etc/letsencrypt
 | |
|    - ./data/certbot/www:/var/www/certbot
 | |
|   command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
 | |
| 
 | |
|  certbot:
 | |
|   image: certbot/certbot
 | |
|   restart: always
 | |
|   volumes:
 | |
|    - ./data/certbot/conf:/etc/letsencrypt
 | |
|    - ./data/certbot/www:/var/www/certbot
 | |
|   entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
 | |
| 
 | |
| 
 |