-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathdocker-compose.yml
96 lines (86 loc) · 1.86 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
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
version: '3.4'
x-common: &common
image: app:local
labels:
com.app: app
networks:
- app
volumes:
- build:/app/build/
services:
builder:
volumes:
- build:/app/build/
- .:/app:delegated
<<: *common
build:
context: .
dockerfile: ./docker/dev/Dockerfile
cache_from:
- 'app:local'
- 'app:${BRANCH_NAME:-ignore}'
container_name: app-builder
working_dir: /app
command: [sh, -c, 'rm -rf ./build/* && ./node_modules/.bin/tsc -w --pretty --skipLibCheck --outDir build/src']
#FOR SWC TRANSPILATION
# command: [sh, -c, 'rm -rf ./build/src/* && ./node_modules/.bin/swc src --out-dir build/src -w --sync & ./node_modules/.bin/tsc -w --pretty --skipLibCheck --noEmit']
js:
image: app:local
env_file:
- .env.dist
depends_on:
- postgres
- redis
networks:
- app
js_test:
image: app:local
env_file:
- .env.test
depends_on:
- postgres_test
- redis
networks:
- app
boilerplate_api:
<<: *common
working_dir: /app/build
container_name: boilerplate_api
command: [sh, -c, 'node --watch --inspect=0.0.0.0 -r source-map-support/register ./src/index.js']
hostname: boilerplate_api
depends_on:
- postgres
- redis
ports:
- 1337:1337
- 4000:4000
- 9229:9229
networks:
- app
postgres:
image: postgres:14-alpine
environment:
POSTGRES_PASSWORD: password
POSTGRES_USERNAME: postgres
POSTGRES_DB: app
networks:
- app
postgres_test:
image: postgres:14-alpine
environment:
POSTGRES_PASSWORD: password
POSTGRES_USERNAME: postgres
POSTGRES_DB: app
networks:
- app
redis:
container_name: redis
image: 'redis'
ports:
- "6379:6379"
networks:
- app
networks:
app:
volumes:
build: