-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
83 lines (78 loc) · 2.05 KB
/
compose.yml
File metadata and controls
83 lines (78 loc) · 2.05 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
services:
app:
container_name: serendipity-app
image: devitools/hyperf:8.3-dev
volumes:
- ./:/opt/www
environment:
- SCAN_CACHEABLE=false
- STDOUT_LOG_LEVEL=alert,critical,emergency,error,warning,notice,info,debug
- SONAR_TOKEN=${SONAR_TOKEN:-undefined}
entrypoint: [ 'tail', '-f', '/dev/null' ]
healthcheck:
test: [ "CMD-SHELL", "php -v || exit 1" ]
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
networks:
- serendipity-network
restart: on-failure
ports:
- "9600:9501"
postgres:
container_name: serendipity-postgres
profiles:
- postgres
image: postgres:16.2
tty: true
environment:
- POSTGRES_DB=${DB_POSTGRES_NAME:-database}
- POSTGRES_USER=${DB_POSTGRES_USERNAME:-username}
- POSTGRES_PASSWORD=${DB_POSTGRES_PASSWORD:-password}
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -U ${DB_POSTGRES_USERNAME:-username} -d ${DB_POSTGRES_NAME:-database}'" ]
interval: 10s
timeout: 3s
retries: 3
volumes:
- serendipity-postgres-data:/var/lib/postgresql/data
networks:
- serendipity-network
ports:
- "9610:5432"
mongo:
container_name: serendipity-mongo
profiles:
- mongo
image: mongo:6.0
hostname: mongo
command: --replSet rs0
volumes:
- serendipity-mongo-data:/data/db
healthcheck:
test: test $$(echo "rs.initiate().ok || rs.status().ok" | mongo -u user -p password --quiet) -eq 1
interval: 10s
start_period: 30s
networks:
- serendipity-network
ports:
- "9620:27017"
mongo-bootstrap:
container_name: serendipity-mongo-bootstrap
profiles:
- mongo
image: mongo:6.0
command: /bin/sh -c "/scripts/bootstrap.sh"
depends_on:
- mongo
volumes:
- ./.docker/mongo/bootstrap.sh:/scripts/bootstrap.sh:ro
networks:
- serendipity-network
volumes:
serendipity-postgres-data:
serendipity-mongo-data:
networks:
serendipity-network:
name: serendipity-network