-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
37 lines (36 loc) · 1.05 KB
/
docker-compose.dev.yaml
File metadata and controls
37 lines (36 loc) · 1.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
name: riverui-dev
services:
postgres:
image: "postgres:16-alpine"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD", "pg_isready", "-d", "river_dev", "-U", "postgres"]
timeout: 20s
retries: 10
start_period: 3s
volumes:
- ./scripts/docker-compose-dev/postgres/init:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
migrate:
image: "golang:1.25-alpine"
depends_on:
postgres:
condition: "service_healthy"
entrypoint: "/bin/sh"
# cache the go binaries so they don't redownload
volumes:
- gopath:/go
command:
- -c
- |
echo "downloading river binary"
go install github.com/riverqueue/river/cmd/river@latest
echo "migrating river_dev database"
river migrate-up --database-url "postgres://postgres:postgres@postgres/river_dev"
echo "migrating river_test database"
river migrate-up --database-url "postgres://postgres:postgres@postgres/river_test"
volumes:
gopath: