forked from benzend/goalboard-collab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
84 lines (78 loc) · 1.51 KB
/
compose.yaml
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
name: goalboard
services:
frontend:
build:
context: frontend
target: development
volumes:
- ./frontend/src:/code/src:ro
networks:
- client-side
backend:
build:
context: backend
target: development
environment:
- ADDRESS=0.0.0.0:8000
- PG_DBNAME=postgres
- PG_HOST=db
- PG_USER=postgres
- PG_PASSWORD=mysecretpassword
volumes:
- ./backend:/code
networks:
- server-side
- client-side
depends_on:
db:
condition: service_healthy
tests:
image: golang:latest
build:
context: backend
target: test
volumes:
- ./backend:/code
working_dir: /code
command: go test ./UnitTesting -count=1
environment:
- ENV=test
networks:
- server-side
proxy:
image: nginx
volumes:
- type: bind
source: ./proxy/nginx.conf
target: /etc/nginx/conf.d/default.conf
read_only: true
ports:
- 8080:80
networks:
- client-side
- server-side
depends_on:
- backend
- frontend
db:
image: postgres:16-alpine
restart: always
environment:
- POSTGRES_PASSWORD=mysecretpassword
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data
networks:
- server-side
healthcheck:
test: ['CMD', 'pg_isready']
interval: 10s
timeout: 5s
retries: 5
user: postgres
volumes:
db-data: {}
networks:
client-side: {}
server-side: {}