1
0
mirror of https://github.com/tommytran732/Vaultwarden-Docker-Compose synced 2024-11-23 08:01:33 -05:00

Properly isolate networks

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2022-11-23 08:17:23 -05:00
parent a2799a9a83
commit 0d95c60bb6
No known key found for this signature in database
GPG Key ID: 060B29EB996BD9F2
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# Synapse-Docker-Compose # Vaultwarden Docker-Compose
Vaultwarden Docker-Compose Vaultwarden Docker-Compose
1. Update `docker-compose.yml` 1. Update `docker-compose.yml`

View File

@ -13,6 +13,7 @@ services:
- vaultwarden:/data - vaultwarden:/data
networks: networks:
- vaultwarden - vaultwarden
- postgres
read_only: true read_only: true
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true
@ -45,7 +46,7 @@ services:
- CAP_NET_BIND_SERVICE - CAP_NET_BIND_SERVICE
postgres: postgres:
image: postgres:alpine image: docker.io/postgres-15:alpine
container_name: postgres container_name: postgres
volumes: volumes:
- postgres:/var/lib/postgresql/data - postgres:/var/lib/postgresql/data
@ -54,7 +55,7 @@ services:
- POSTGRES_PASSWORD=YOUR_POSTGRESQL_PASSWORD - POSTGRES_PASSWORD=YOUR_POSTGRESQL_PASSWORD
restart: unless-stopped restart: unless-stopped
networks: networks:
- vaultwarden - postgres
user: "70:70" user: "70:70"
read_only: true read_only: true
tmpfs: tmpfs:
@ -65,8 +66,9 @@ services:
- ALL - ALL
volumes: volumes:
postgres:
vaultwarden: vaultwarden:
postgres:
networks: networks:
vaultwarden: vaultwarden:
postgres: