|
@@ -0,0 +1,64 @@
|
|
1
|
+version: '2'
|
|
2
|
+
|
|
3
|
+services:
|
|
4
|
+ postgres:
|
|
5
|
+ image: postgres:13-alpine
|
|
6
|
+ restart: ${ALL_RESTART_POLICY}
|
|
7
|
+ networks:
|
|
8
|
+ main.internal.docker:
|
|
9
|
+ aliases:
|
|
10
|
+ - postgres.main.internal.docker
|
|
11
|
+ volumes:
|
|
12
|
+ - ./data/postgres/data:/var/lib/postgresql/data
|
|
13
|
+ environment:
|
|
14
|
+ TZ: ${ALL_TZ}
|
|
15
|
+ POSTGRES_USER: ${POSTGRES_USER}
|
|
16
|
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
17
|
+ POSTGRES_DB: ${POSTGRES_DB}
|
|
18
|
+ ports:
|
|
19
|
+ - "127.0.0.1:34080:5432"
|
|
20
|
+
|
|
21
|
+ postgres-backup:
|
|
22
|
+ image: prodrigestivill/postgres-backup-local:13-alpine
|
|
23
|
+ restart: ${ALL_RESTART_POLICY}
|
|
24
|
+ networks:
|
|
25
|
+ main.internal.docker:
|
|
26
|
+ aliases:
|
|
27
|
+ - postgres-backup.main.internal.docker
|
|
28
|
+ volumes:
|
|
29
|
+ - ./data/postgres-backup/data:/backups
|
|
30
|
+ environment:
|
|
31
|
+ TZ: ${ALL_TZ}
|
|
32
|
+ POSTGRES_USER: ${POSTGRES_USER}
|
|
33
|
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
34
|
+ POSTGRES_DB: ${POSTGRES_DB}
|
|
35
|
+ POSTGRES_HOST: ${POSTGRES_HOST}
|
|
36
|
+ SCHEDULE: 0 17 2 * * * # every day at 02:17:00 AM
|
|
37
|
+ BACKUP_KEEP_DAYS: 7
|
|
38
|
+ BACKUP_KEEP_WEEKS: 4
|
|
39
|
+ BACKUP_KEEP_MONTHS: 12
|
|
40
|
+
|
|
41
|
+ traccar:
|
|
42
|
+ build:
|
|
43
|
+ context: ./traccar
|
|
44
|
+ # image: traccar/traccar:5.6-debian
|
|
45
|
+ restart: ${ALL_RESTART_POLICY}
|
|
46
|
+ networks:
|
|
47
|
+ main.internal.docker:
|
|
48
|
+ aliases:
|
|
49
|
+ - zabbix.main.internal.docker
|
|
50
|
+ ports:
|
|
51
|
+ - "0.0.0.0:35300:8082"
|
|
52
|
+ - "0.0.0.0:5170:5170/udp"
|
|
53
|
+ volumes:
|
|
54
|
+ - ./data/traccar/logs:/opt/traccar/logs
|
|
55
|
+ - ./data/traccar/traccar.xml:/opt/traccar/traccar-default.xml:ro
|
|
56
|
+ environment:
|
|
57
|
+ TZ: ${ALL_TZ}
|
|
58
|
+ DB_SERVER_HOST: ${POSTGRES_HOST}
|
|
59
|
+ POSTGRES_USER: ${POSTGRES_USER}
|
|
60
|
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
61
|
+ POSTGRES_DB: ${POSTGRES_DB}
|
|
62
|
+
|
|
63
|
+networks:
|
|
64
|
+ main.internal.docker:
|