-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
59 lines (55 loc) · 1.09 KB
/
docker-compose.yml
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
x-app: &app
build:
context: .
env_file:
- .env
services:
database:
restart: always
image: postgres:16.4
user: postgres
environment:
POSTGRES_PASSWORD: "postgres"
PG_USER: "postgres"
POSTGRES_DB: "ezsplit_dev"
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 2s
timeout: 5s
retries: 5
db-ui:
restart: always
image: sosedoff/pgweb
ports:
- "8081:8081"
depends_on:
- database
environment:
- PGWEB_DATABASE_URL=postgres://postgres:postgres@database:5432/ezsplit_dev?sslmode=disable
web:
<<: *app
restart: always
command: go run ./cmd/ezsplit/main.go
develop:
watch:
- action: sync+restart
path: .
target: /app
ports:
- "7777:7777"
depends_on:
database:
condition: service_healthy
dev-cli:
<<: *app
command: bash
volumes:
- .:/app
profiles:
- dev-cli
depends_on:
database:
condition: service_healthy