mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
* Checkpoint * Checkpoint * checkpoint * fix typo * Update migrate with changes * UID and GID * fix perms * Remove custom user * Fix migrate script typos * fix grep * remove cleverness * migrate final fixes
71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
# Example compose file for production deployment.
|
|
#
|
|
# Note: This file is meant to serve as a template. Please modify it
|
|
# according to your needs. Read more about Docker Compose:
|
|
#
|
|
# https://docs.docker.com/compose/compose-file/
|
|
#
|
|
#
|
|
x-deploy: &default-deploy
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 3
|
|
window: 120s
|
|
update_config:
|
|
order: start-first
|
|
|
|
version: '3.7'
|
|
|
|
services:
|
|
caddy:
|
|
image: caddy:2
|
|
volumes:
|
|
- ${FZ_INSTALL_DIR:-.}/caddy:/data/caddy
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
command: caddy reverse-proxy --to firezone:13000 --from ${EXTERNAL_URL:?err} ${CADDY_OPTS}
|
|
deploy:
|
|
<<: *default-deploy
|
|
|
|
firezone:
|
|
image: firezone/firezone
|
|
ports:
|
|
- 51820:51820/udp
|
|
env_file:
|
|
# This should contain a list of env vars for configuring Firezone.
|
|
# See https://docs.firezone.dev/reference/env-vars for more info.
|
|
- ${FZ_INSTALL_DIR:-.}/.env
|
|
volumes:
|
|
# IMPORTANT: Persists WireGuard private key and other data. If
|
|
# /var/firezone/private_key exists when Firezone starts, it is
|
|
# used as the WireGuard private. Otherwise, one is generated.
|
|
- ${FZ_INSTALL_DIR:-.}/firezone:/var/firezone
|
|
cap_add:
|
|
# Needed for WireGuard and firewall support.
|
|
- NET_ADMIN
|
|
- SYS_MODULE
|
|
sysctls:
|
|
# Needed for masquerading and NAT.
|
|
- net.ipv6.conf.all.disable_ipv6=0
|
|
- net.ipv4.ip_forward=1
|
|
- net.ipv6.conf.all.forwarding=1
|
|
depends_on:
|
|
- postgres
|
|
deploy:
|
|
<<: *default-deploy
|
|
|
|
postgres:
|
|
image: postgres:15
|
|
volumes:
|
|
- ${FZ_INSTALL_DIR:-.}/postgres:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_DB: ${DATABASE_NAME:-firezone}
|
|
POSTGRES_USER: ${DATABASE_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:?err}
|
|
deploy:
|
|
<<: *default-deploy
|
|
update_config:
|
|
order: stop-first
|