-
Notifications
You must be signed in to change notification settings - Fork 0
/
batect-server.yml
117 lines (109 loc) · 2.72 KB
/
batect-server.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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
containers:
diary-server:
image: diary-server:latest
dependencies:
- diary-db
environment:
DATABASE_URL: postgresql://dev:dev@diary-db:5432/dev
diary-server-gateway:
image: flaccid/tls-proxy
dependencies:
- diary-server
environment:
UPSTREAM_HOST: diary-server
UPSTREAM_PORT: 4000
FORCE_HTTPS: true
SELF_SIGNED: true
diary-server-dev:
image: node:21.7.3
working_directory: /app
command: pnpm --filter server dev
ports:
- 4000:4000
dependencies:
- diary-db
environment:
DATABASE_URL: postgresql://dev:dev@diary-db:5432/dev
health_check:
command: curl localhost:4000
retries: 20
interval: 5s
volumes:
- local: .
container: /app
- type: cache
name: node-modules
container: /app/node_modules
- type: cache
name: client-node-modules
container: /app/workspaces/client/node_modules
- type: cache
name: server-node-modules
container: /app/workspaces/server/node_modules
- type: cache
name: e2e-node-modules
container: /app/workspaces/e2e/node_modules
diary-db:
image: postgres:16.3
health_check:
command: pg_isready -d postgresql://dev:dev@diary-db:5432/dev
interval: 5s
retries: 6
volumes:
- ./workspaces/server/initdb.d:/docker-entrypoint-initdb.d
environment:
POSTGRES_PASSWORD: dev
POSTGRES_USER: dev
POSTGRES_DB: dev
tasks:
server-lint:
prerequisites:
- setup
run:
container: diary-build-env
command: pnpm --filter server lint
server-test:
prerequisites:
- setup
dependencies:
- diary-db
customise:
diary-db:
environment:
POSTGRES_PASSWORD: test
POSTGRES_USER: test
POSTGRES_DB: test
run:
container: diary-build-env
command: pnpm --filter server test
environment:
DATABASE_URL: postgresql://test:test@diary-db:5432/test
server-coverage:
prerequisites:
- setup
dependencies:
- diary-db
customise:
diary-db:
environment:
POSTGRES_PASSWORD: test
POSTGRES_USER: test
POSTGRES_DB: test
run:
container: diary-build-env
command: pnpm --filter server coverage
environment:
DATABASE_URL: postgresql://test:test@diary-db:5432/test
server-build:
prerequisites:
- setup
run:
container: diary-build-env
command: pnpm --filter server build
server-package:
prerequisites:
- server-build
run:
container: diary-package-env
command: docker build -t diary-server .
working_directory: /app/workspaces/server