-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (56 loc) · 1.29 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
version: '3'
services:
db:
build:
context: .
dockerfile: ./container/db/Dockerfile
ports:
- 5050:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: librarynet
volumes:
- ./database:/usr/src
- librarynet_db_data:/var/lib/postgresql/data
# - ./container/db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
container_name: librarynet_db
redis:
image: redis
ports:
- 6060:6379
container_name: librarynet_redis
server:
build:
context: .
dockerfile: ./container/server/Dockerfile
depends_on:
- db
- redis
tty: true
ports:
- 4000:4000
command: yarn dev-ts
volumes:
- ./server:/usr/src/app
# https://medium.com/@semur.nabiev/how-to-make-docker-compose-volumes-ignore-the-node-modules-directory-99f9ec224561
- /usr/src/app/node_modules
container_name: librarynet_server
web:
build:
context: .
dockerfile: ./container/web/Dockerfile
depends_on:
- db
- redis
- server
tty: true
ports:
- 3000:3000
command: yarn dev
volumes:
- ./web:/usr/src/app
- /usr/src/app/node_modules
container_name: librarynet_web
volumes:
librarynet_db_data: {}