Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 2.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 2.07 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
services:
postgres:
image: postgres:18.6
container_name: solidping-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "55432:5432"
volumes:
#- postgres_data:/var/lib/postgresql
- ./docker-compose/scripts/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# Headless Chrome for `browser` checks. Optional and OFF by default — start it
# with `docker compose --profile browser up -d`. The main image is distroless
# and carries no Chrome on purpose; the checker talks CDP to this container.
browser:
image: chromedp/headless-shell:152.0.7939.3
container_name: solidping-browser
profiles: ["browser"]
# --remote-allow-origins is required from Chrome 111 on for a websocket
# client that is not a browser page.
command:
- --remote-debugging-address=0.0.0.0
- --remote-debugging-port=9222
- --remote-allow-origins=*
- --disable-gpu
- --no-sandbox
# Chrome mounts /dev/shm and the Docker default (64 MB) makes tabs crash.
shm_size: 1gb
stop_grace_period: 1s
server:
image: golang:1.27.1-trixie
container_name: solidping-server
working_dir: /app
command: sh -c "go install github.com/air-verse/air@v1.63.4 && air -c .air.toml"
ports:
- "4000:4000"
volumes:
- ./server:/app
- go_modules:/go/pkg/mod
environment:
- SP_DB_TYPE=postgres
- SP_DB_URL=postgres://solidping:solidping@postgres:5432/solidping?sslmode=disable
- SP_AUTH_JWT_SECRET=dev-secret-change-in-production
- SP_SERVER_LISTEN=:4000
- SP_SERVER_JOB_RUNNERS=1
# Uncomment together with the `browser` profile above to run browser
# checks against the sidecar instead of a local Chrome binary.
# - SP_CHECKERS_BROWSER_CDP_URL=ws://browser:9222
depends_on:
postgres:
condition: service_healthy
stop_grace_period: 1s
volumes:
go_modules: