-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
88 lines (83 loc) · 1.89 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
version: "3"
services:
frontend:
build:
context: .
dockerfile: Dockerfile_vue
container_name: "frontend_service1"
volumes:
- "./:/app"
- "/app/frontend/node_modules"
- "/app/.vscode"
- "/app/.idea"
# 本番環境のサーバーで使用
# ports:
# - "80:80"
depends_on:
- backend
backend:
build:
context: .
dockerfile: Dockerfile_flask
container_name: "backend_service1"
volumes:
- "./:/app"
- "/app/.vscode"
- "/app/.idea"
ports:
- "5000:5000"
environment:
DATABASE_USER: root
DATABASE_HOST: postgres
DATABASE_PASSWORD: pass
DATABASE_NAME: lifehack
depends_on:
- postgres
# stdin_open: true
# tty: true
# mysql:
# image: mysql:5.7
# container_name: mysql_container
# volumes:
# - ./mysql/work:/var/lib/mysql
# ports:
# - 3306:3306
# environment:
# MYSQL_DATABASE: root
# MYSQL_ROOT_PASSWORD: pass
# MYSQL_DATABASE: lifehack
postgres:
image: postgres
container_name: "postgres_service1"
volumes:
- "database:/var/lib/postgresql/data"
expose:
- "5432"
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=lifehack
restart: always
stdin_open: true
# 本番環境のサーバーで使用
# uwsgi:
# build:
# context: .
# dockerfile: Dockerfile_uwsgi
# container_name: "uwsgi"
# volumes:
# - "./:/app"
# - "/app/.vscode"
# - "/app/.idea"
# expose:
# - "8080"
# environment:
# DATABASE_USER: takowasan
# DATABASE_HOST: postgres
# DATABASE_PASSWORD: pass
# DATABASE_NAME: tabiluck
# depends_on:
# - postgres
volumes:
database:
driver: local