-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
98 lines (92 loc) · 2.44 KB
/
docker-compose.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
version: '2'
x-env:
&passbolt-env
APP_FULL_BASE_URL: https://a-very-long-generated-id.balena-devices.com/
DATASOURCES_DEFAULT_HOST: "db"
DATASOURCES_DEFAULT_USERNAME: "passbolt"
DATASOURCES_DEFAULT_PASSWORD: "P4ssb0lt"
DATASOURCES_DEFAULT_DATABASE: "passbolt"
EMAIL_TRANSPORT_DEFAULT_PORT: 587
EMAIL_TRANSPORT_DEFAULT_HOST: "smtp.domain.tld"
EMAIL_DEFAULT_FROM: "admin@domain.tld"
BACKUP_INTERVAL: "86400"
MYSQL_ROOT_PASSWORD: "rootpassword"
MYSQL_DATABASE: "passbolt"
MYSQL_USER: "passbolt"
MYSQL_PASSWORD: "P4ssb0lt"
TZ: "Europe/Paris"
services:
db:
image: yobasystems/alpine-mariadb
restart: unless-stopped
environment:
<<: *passbolt-env
volumes:
- database_volume:/var/lib/mysql
expose:
- "3306"
redis:
image: anatomicjc/redis
entrypoint:
- /usr/local/bin/redis-server
backup:
image: rclone/rclone
environment:
<<: *passbolt-env
entrypoint:
- /bin/ash
command: |-
-c 'apk add mariadb-client;
if [ ! -f /data/backup.sh ]
then
pwd;
cd /data;
echo "/data/backup.sh script is missing, fetching...";
wget https://raw.githubusercontent.com/passbolt/lab-passbolt-balena/main/misc/backup.sh;
cd -;
sleep 120;
fi
while true; do
/bin/ash backup.sh;
done'
volumes:
- rclone_config:/config
- rclone_data:/data
- gpg_volume:/etc/passbolt/gpg
- jwt_volume:/etc/passbolt/jwt
passbolt:
image: passbolt/passbolt:4.6.0-1-ce
restart: unless-stopped
links:
- "db"
environment:
<<: *passbolt-env
volumes:
- gpg_volume:/etc/passbolt/gpg
- jwt_volume:/etc/passbolt/jwt
command: |
bash -c "apt-get update;
apt-get install -y php-redis;
cat <<EOF > /etc/php/7.3/fpm/pool.d/999-passbolt.conf;
[www]
pm = dynamic
pm.max_children = 40
pm.start_servers = 16
pm.min_spare_servers = 8
pm.max_spare_servers = 24
clear_env = no
php_admin_value[memory_limit] = 256M
php_admin_value[max_execution_time] = 120
php_admin_value[session.gc_maxlifetime] = 14400
php_admin_value[session.save_handler] = redis
php_admin_value[session.save_path] = tcp://redis:6379
EOF
/usr/bin/wait-for.sh -t 0 db:3306 -- /docker-entrypoint.sh"
ports:
- 80:80
volumes:
database_volume:
gpg_volume:
jwt_volume:
rclone_config:
rclone_data: