Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
117 lines (109 loc) · 2.53 KB
/
Copy pathcompose.yml
File metadata and controls
117 lines (109 loc) · 2.53 KB
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
x-app: &app
build: .
image: rsync-ui:development
# Run an init process as PID 1 that reaps orphaned processes (e.g. Chrome processes spawned by system specs),
# instead of foreman, which shuts down all processes when an unknown child process exits
init: true
volumes:
- .:/app/
- bundle:/usr/local/bundle/
- npm:/app/node_modules/
- ssh:/app/.ssh
- storage:/app/tmp/storage
- ./docker/pre_sync.sh:/usr/local/bin/pre_sync.sh:ro
- ./docker/post_sync.sh:/usr/local/bin/post_sync.sh:ro
- ./tmp/data/app:/data
extra_hosts:
- "nas:172.16.200.101"
- "backup:172.16.200.102"
- "backup.example.com:172.16.200.102"
- "mirror:172.16.200.103"
- "mirror.example.com:172.16.200.103"
env_file:
- .development.env
networks:
- default
- ssh-servers
services:
postgres:
image: postgres:18
volumes:
- postgres:/var/lib/postgresql/18/docker/
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 2s
timeout: 5s
retries: 30
app:
<<: *app
hostname: app
entrypoint: /app/docker/ssh/init-app.sh
command: foreman start
tty: true
ports:
- "127.0.0.1:3000:3000"
depends_on:
postgres:
condition: service_healthy
nas:
condition: service_started
backup:
condition: service_started
mirror:
condition: service_started
worker:
<<: *app
hostname: worker
command: bin/jobs
tty: true
depends_on:
postgres:
condition: service_healthy
nas:
image: alpine:3.24
volumes:
- ./docker/ssh/init-nas.sh:/init.sh:ro
- ./tmp/data/nas:/data
command: /init.sh
networks:
ssh-servers:
ipv4_address: 172.16.200.101
backup:
image: alpine:3.24
volumes:
- ./docker/ssh/init-backup.sh:/init.sh:ro
- ./tmp/data/backup:/backup
command: /init.sh
networks:
ssh-servers:
ipv4_address: 172.16.200.102
mirror:
image: alpine:3.24
volumes:
- ./docker/ssh/init-mirror.sh:/init.sh:ro
- ./tmp/data/mirror:/backup
command: /init.sh
networks:
ssh-servers:
ipv4_address: 172.16.200.103
volumes:
postgres:
bundle:
npm:
ssh:
storage:
driver_opts:
type: tmpfs
device: tmpfs
o: "mode=755,uid=1000,gid=1000"
networks:
default: {}
ssh-servers:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.200.0/24