-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (41 loc) · 1.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (41 loc) · 1.05 KB
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
version: "3.9"
services:
front:
container_name: front
build:
context: ./front/app/electronic_key_front
dockerfile: Dockerfile
volumes:
- type: bind
source: ./front/app
target: /usr/src/front/app/
#"react-app"の部分がプロジェクト名になる
command: sh -c "cd /usr/src/front/app/electronic_key_front && npm start"
ports:
- 3000:3000
stdin_open: true #標準入力をコンテナと紐付ける
backend:
container_name: backapp
build: ./server
ports:
- "5001:5001"
environment:
- backapp=/usr/src/app/server/server.py
volumes:
- type: bind
source: ./server
target: /usr/src/app/server/
command: python3 /usr/src/app/server/server.py
db:
image: postgres:14
container_name: postgres_pta
ports:
- 5432:5432
volumes:
- db-store:/var/lib/postgresql/data
environment:
POSTGRES_USER: '${user}'
POSTGRES_PASSWORD: '${pwd}'
POSTGRES_DB: '${DBname}'
volumes:
db-store: