-
Notifications
You must be signed in to change notification settings - Fork 362
/
docker-compose-pwpush.yml
142 lines (133 loc) · 4.66 KB
/
docker-compose-pwpush.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
volumes:
caddy_data:
caddy_config:
x-op-app-environment: &x-op-app-environment
environment:
# See also the Password Pusher Configuration documentation
# https://docs.pwpush.com/docs/config-strategies/
#
# Uncomment the following lines to set environment variables and add your own.
# environment:
# PWP__PW__EXPIRE_AFTER_DAYS_DEFAULT: "1"
# PWP__PW__EXPIRE_AFTER_VIEWS_MIN: "1"
# PWP__PW__RETRIEVAL_STEP_DEFAULT: "true"
#
# PosgreSQL database URL is default. Comment out for Ephemeral SQLite3.
DATABASE_URL: 'postgres://pwpush_user:pwpush_passwd@db:5432/pwpush_db'
#
# --> Use this line instead for a MySQL or MariaDB database
# DATABASE_URL: 'mysql2://pwpush_user:pwpush_passwd@mysql:3306/pwpush_db'
################################################################################################
# You can set other environment variables here, or in a env file. See:
# https://docs.docker.com/compose/environment-variables/
#
# Password Pusher provides an example Docker environment file:
# https://github.com/pglombardo/PasswordPusher/tree/master/containers/docker/pwpush-docker-env-file
services:
# The Password Pusher application
pwpush:
image: docker.io/pglombardo/pwpush:latest
restart: unless-stopped
ports:
- "5100:5100"
<<: *x-op-app-environment
depends_on:
- db # Comment out if using SQLite3 (Ephemeral)
links:
- db:db
# The Password Pusher worker: runs background jobs & periodic cleanup tasks
# Not a required component, but recommended for production use.
#
# --> Make sure this worker has the same settings as the main Password Pusher application.
# These settings will soon be moved into the database. 10/10/2024
#
# --> Comment this worker out if you switch to an ephemeral backed instance!
# It requires a shared database with the main Password Pusher application.
worker:
image: docker.io/pglombardo/pwpush-worker:latest
restart: unless-stopped
<<: *x-op-app-environment
depends_on:
- pwpush
- db
links:
- db:db
# CaddyServer as a reverse proxy with automatic HTTPS
ssl_proxy:
image: caddy:latest
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
# Make sure to edit the contents of this Caddyfile
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- pwpush
# --> By default, this file will launch a Password Pusher instance with a
# postgres database. If you want to use MySQL or MariaDB, uncomment the
# appropriate block below.
#
# If you want an ephemeral SQLite3 database
# 1. comment out the database blocks entirely
# 2. comment out the "worker" service
#
# With the ephemeral database, it will be lost on container restart.
db:
image: docker.io/postgres:15
restart: unless-stopped
volumes:
- /var/lib/postgresql2/data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
POSTGRES_USER: pwpush_user
POSTGRES_PASSWORD: pwpush_passwd
POSTGRES_DB: pwpush_db
# Use this db block instead for a MySQL database
#
# db:
# image: mysql:8.0.32
# ports:
# - "3306:3306"
# environment:
# MYSQL_USER: 'pwpush_user'
# MYSQL_PASSWORD: 'pwpush_passwd'
# MYSQL_DATABASE: 'pwpush_db'
# MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
# volumes:
# - /var/lib/pwpush-mysql/data:/var/lib/mysql
# Use this db block instead for a MariaDB database
#
# db:
# image: mariadb:10.6.5
# ports:
# - "3306:3306"
# environment:
# MARIADB_USER: 'pwpush_user'
# MARIADB_PASSWORD: 'pwpush_passwd'
# MARIADB_DATABASE: 'pwpush_db'
# MARIADB_RANDOM_ROOT_PASSWORD: 'yes'
# volumes:
# - /var/lib/pwpush-mariadb/data:/var/lib/mysql
###############################################################################
# Other Notes
###############################################################################
#
# Uncomment the following lines to mount a volume.
# volumes:
# # Example of a persistent volume for the storage directory (file uploads)
# - /path/to/directory:/opt/PasswordPusher/storage:rw
#
# Or you could override a single file in the container with a bind mount:
# volumes:
# - type: bind
# source: /path/to/my/custom/settings.yml
# target: /opt/PasswordPusher/config/settings.yml
#
# To customise the application via configuration file, see settings.yml:
# https://github.com/pglombardo/PasswordPusher/blob/master/config/settings.yml
#
# Then you can use the above bind mount to overlay the file into the container on boot.