feat: new postgres image and yml anchor
This commit is contained in:
39
compose.yaml
39
compose.yaml
@@ -1,4 +1,9 @@
|
|||||||
name: "netbird"
|
name: "netbird"
|
||||||
|
|
||||||
|
x-image-netbird: &image
|
||||||
|
image: "11notes/netbird:0.50.2"
|
||||||
|
read_only: true
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: "11notes/postgres:16"
|
image: "11notes/postgres:16"
|
||||||
@@ -6,22 +11,22 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
TZ: "Europe/Zurich"
|
TZ: "Europe/Zurich"
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
# make a full and compressed database backup each day at 03:00
|
||||||
|
POSTGRES_BACKUP_SCHEDULE: "0 3 * * *"
|
||||||
volumes:
|
volumes:
|
||||||
- "db.etc:/postgres/etc"
|
- "db.etc:/postgres/etc"
|
||||||
- "db.var:/postgres/var"
|
- "db.var:/postgres/var"
|
||||||
- "db.backup:/postgres/backup"
|
- "db.backup:/postgres/backup"
|
||||||
# used for optional cron container to create automatic backups
|
|
||||||
- "db.cmd:/run/cmd"
|
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- "/run/postgresql:uid=1000,gid=1000"
|
# needed for read-only
|
||||||
|
- "/postgres/run:uid=1000,gid=1000"
|
||||||
- "/postgres/log:uid=1000,gid=1000"
|
- "/postgres/log:uid=1000,gid=1000"
|
||||||
networks:
|
networks:
|
||||||
backend:
|
backend:
|
||||||
restart: "always"
|
restart: "always"
|
||||||
|
|
||||||
dashboard:
|
dashboard:
|
||||||
image: "11notes/netbird:0.48.0"
|
<<: *image
|
||||||
read_only: true
|
|
||||||
environment:
|
environment:
|
||||||
NETBIRD_MGMT_API_ENDPOINT: "https://${NETBIRD_FQDN}"
|
NETBIRD_MGMT_API_ENDPOINT: "https://${NETBIRD_FQDN}"
|
||||||
NETBIRD_MGMT_GRPC_API_ENDPOINT: "https://${NETBIRD_FQDN}"
|
NETBIRD_MGMT_GRPC_API_ENDPOINT: "https://${NETBIRD_FQDN}"
|
||||||
@@ -54,8 +59,7 @@ services:
|
|||||||
db:
|
db:
|
||||||
condition: "service_healthy"
|
condition: "service_healthy"
|
||||||
restart: true
|
restart: true
|
||||||
image: "11notes/netbird:0.48.0"
|
<<: *image
|
||||||
read_only: true
|
|
||||||
env_file: '.env'
|
env_file: '.env'
|
||||||
environment:
|
environment:
|
||||||
TZ: "Europe/Zurich"
|
TZ: "Europe/Zurich"
|
||||||
@@ -82,7 +86,7 @@ services:
|
|||||||
restart: "always"
|
restart: "always"
|
||||||
|
|
||||||
signal:
|
signal:
|
||||||
image: "11notes/netbird:0.48.0"
|
<<: *image
|
||||||
environment:
|
environment:
|
||||||
TZ: "Europe/Zurich"
|
TZ: "Europe/Zurich"
|
||||||
entrypoint: ["/usr/local/bin/signal"]
|
entrypoint: ["/usr/local/bin/signal"]
|
||||||
@@ -100,7 +104,7 @@ services:
|
|||||||
restart: "always"
|
restart: "always"
|
||||||
|
|
||||||
relay:
|
relay:
|
||||||
image: "11notes/netbird:0.48.0"
|
<<: *image
|
||||||
environment:
|
environment:
|
||||||
TZ: "Europe/Zurich"
|
TZ: "Europe/Zurich"
|
||||||
NB_LISTEN_ADDRESS: ":33080"
|
NB_LISTEN_ADDRESS: ":33080"
|
||||||
@@ -113,22 +117,6 @@ services:
|
|||||||
- "33080:33080/tcp"
|
- "33080:33080/tcp"
|
||||||
restart: "always"
|
restart: "always"
|
||||||
|
|
||||||
# optional images
|
|
||||||
cron:
|
|
||||||
depends_on:
|
|
||||||
db:
|
|
||||||
condition: "service_healthy"
|
|
||||||
restart: true
|
|
||||||
image: "11notes/cron:4.6"
|
|
||||||
environment:
|
|
||||||
TZ: "Europe/Zurich"
|
|
||||||
# create daily full backup at 3 o'clock
|
|
||||||
CRONTAB: |-
|
|
||||||
0 3 * * * cmd-socket '{"bin":"backup"}' > /proc/1/fd/1
|
|
||||||
volumes:
|
|
||||||
- "db.cmd:/run/cmd"
|
|
||||||
restart: "always"
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
management.etc:
|
management.etc:
|
||||||
management.var:
|
management.var:
|
||||||
@@ -137,7 +125,6 @@ volumes:
|
|||||||
db.etc:
|
db.etc:
|
||||||
db.var:
|
db.var:
|
||||||
db.backup:
|
db.backup:
|
||||||
db.cmd:
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
frontend:
|
frontend:
|
||||||
|
|||||||
Reference in New Issue
Block a user