2022-11-26 22:00:34 +00:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
database:
|
|
|
|
container_name: ${db_container_name}
|
|
|
|
# Don't upgrade PostgreSQL by simply changing the version number
|
|
|
|
# You need to migrate the Database to the new PostgreSQL version
|
|
|
|
image: ${database_image}:${database_version}
|
|
|
|
#mem_limit: 256mb # version 2 only
|
|
|
|
#memswap_limit: 512mb # version 2 only
|
|
|
|
#read_only: true # not supported in swarm mode please enable along with tmpfs
|
|
|
|
#tmpfs:
|
|
|
|
# - /run/postgresql:size=512K
|
|
|
|
# - /tmp:size=256K
|
|
|
|
#environment:
|
|
|
|
# - POSTGRES_USER=vaultwarden
|
|
|
|
# - POSTGRES_PASSWORD=
|
|
|
|
# - POSTGRES_DB=vaultwarden
|
|
|
|
volumes:
|
2023-04-18 19:43:09 +00:00
|
|
|
- database:${database_path}:Z
|
2022-11-26 22:00:34 +00:00
|
|
|
networks:
|
|
|
|
backend:
|
|
|
|
#restart: always
|
|
|
|
|
|
|
|
app:
|
|
|
|
container_name: ${container_name}
|
|
|
|
image: ${vaultwarden_image}:${vaultwarden_version}
|
|
|
|
volumes:
|
2023-04-18 19:43:09 +00:00
|
|
|
- data:/data:Z
|
2022-11-26 22:00:34 +00:00
|
|
|
ports:
|
|
|
|
- "127.0.0.1:8090:80"
|
|
|
|
networks:
|
|
|
|
backend:
|
|
|
|
depends_on:
|
|
|
|
- ${db_container_name}
|
|
|
|
|
|
|
|
# Define networks to allow best isolation
|
|
|
|
networks:
|
|
|
|
# Internal network for communication with PostgreSQL/MySQL
|
|
|
|
backend:
|
|
|
|
|
|
|
|
# Define named volumes so data stays in place
|
|
|
|
volumes:
|
|
|
|
# Volume for PostgreSQL/MySQL database
|
|
|
|
database:
|
|
|
|
data:
|