-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
103 lines (99 loc) · 2.45 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
97
98
99
100
101
102
103
version: "3"
services:
db:
build:
context: ./files
dockerfile: Dockerfile_postgres
env_file: .env
restart: always
tty: true
stdin_open: true
ports:
- ${DB_PORT}:5432
volumes:
- ./files/postgres/init:/docker-entrypoint-initdb.d
# - ./files/postgres/data:/var/lib/postgresql/data
# - ./files/postgres/data:/var/lib/postgresql/data/pgdata
# db 周りで、パミッションの調整がうまくいかないので、とりあえず
# docker aria のボリュームに保存
- db-data:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_INITDB_ARGS: ${POSTGRES_INITDB_ARGS}
# パミッション対策、データ保存をデフォルトから変更(一層深くした)
PGDATA: /var/lib/postgresql/data/pgdata
hostname: postgres
user: root
go:
build:
context: ./files
dockerfile: Dockerfile_go
env_file: .env
working_dir: /Back
ports:
- ${BACK_PORT}:8000
- 2345:2345
volumes:
- ./Back:/Back
- ./_go_roothome/:/root
- gopath:/go
depends_on:
- db
tty: true
stdin_open: true
environment:
- "GOPATH=/Back"
security_opt:
- apparmor:unconfined
cap_add:
- SYS_PTRACE
node:
build:
context: ./files
dockerfile: Dockerfile_node
env_file: .env
working_dir: /Front
ports:
- ${FRONT_PORT}:3000
volumes:
- ./Front:/Front
- ./_node_roothome/:/root
depends_on:
- db
tty: true
stdin_open: true
# web:
# image: nginx:alpine
# env_file: .env
# depends_on:
# - node
# volumes:
# - ./files/nginx/conf.d:/etc/nginx/conf.d
# ports:
# - ${WEB_PORT}:80
swagger-editor:
image: swaggerapi/swagger-editor
container_name: "swagger-editor"
ports:
- "10081:8080"
swagger-ui:
image: swaggerapi/swagger-ui
container_name: "swagger-ui"
ports:
- "10082:8080"
volumes:
- ./openapi/api_reference.yaml:/usr/share/nginx/html/api_reference.yaml
environment:
API_URL: api_reference.yaml
swagger-mock:
image: stoplight/prism:4
container_name: "swagger-mock"
ports:
- "10083:4010"
command: mock -h 0.0.0.0 /openapi/api_reference.yaml
volumes:
- ./openapi/api_reference.yaml:/openapi/api_reference.yaml
volumes:
db-data:
gopath: