forked from Material-MADS/mads-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml.example
More file actions
119 lines (112 loc) · 3.43 KB
/
docker-compose.yml.example
File metadata and controls
119 lines (112 loc) · 3.43 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: "3.1"
#=================================================================================================
# Project: CADS/MADS - An Integrated Web-based Visual Platform for Materials Informatics
# Hokkaido University (2018)
# Last Update: Q3 2023
# ________________________________________________________________________________________________
# Authors: Mikael Nicander Kuwahara (Lead Developer) [2021-]
# Jun Fujima (Former Lead Developer) [2018-2021]
# ________________________________________________________________________________________________
# Description: Docker-Compose file for running CADS via Docker
#=================================================================================================
#-------------------------------------------------------------------------------------------------
services:
db:
# environment:
# POSTGRES_DB: "app_db"
# POSTGRES_USER: "app_user"
# POSTGRES_PASSWORD: "changeme"
env_file: .env
restart: always
image: postgres:9.6
expose:
- "5432"
volumes:
- dbdata:/var/lib/postgresql/data
logging:
driver: "json-file" # defaults if not specified
options:
max-size: "10m"
max-file: "5"
redis:
restart: always
image: redis:3.0
expose:
- "6379"
logging:
driver: "json-file" # defaults if not specified
options:
max-size: "10m"
max-file: "5"
# celery:
# build: .
# env_file: .env
# command: celery worker --app=madsapp --loglevel=info
# volumes:
# - .:/code
# depends_on:
# - db
# - redis
app:
# environment:
# DATABASE_URL: postgres://app_user:changeme@db/app_db
# REDIS_URL: redis://redis
# DJANGO_MANAGEPY_MIGRATE: "on"
env_file: .env
build:
context: .
dockerfile: ./Dockerfile
# command: bash -c "python manage.py migrate && gunicorn madsapp.wsgi -b 0.0.0.0:8000 --limit-request-line 8188 --log-file -"
command: ["./bin/wait-for-postgres.sh", "db", "sh", "./bin/start-app.sh"]
# command: ["sh", "./bin/start-app.sh"]
#, "&&", "gunicorn", "madsapp.wsgi", "-b", "0.0.0.0:8000", "--limit-request-line", "8188", "--log-file", "-"]
ports:
- "8000:8000"
volumes:
- ./staticfiles:/usr/src/app/staticfiles
- ./mediafiles:/usr/src/app/mediafiles
- ./private_media:/usr/src/app/private_media
expose:
- "8000"
depends_on:
- db
- redis
logging:
driver: "json-file" # defaults if not specified
options:
max-size: "10m"
max-file: "5"
nginx:
# restart: always
image: nginx
container_name: ng01
ports:
- "80:80"
- "443:443"
# expose:
# - "80"
# - "443"
volumes:
# - .:/usr/src/app
- ./nginx:/etc/nginx/conf.d
- /Data/cert:/etc/ssl/certs
# - ./nginx/:/etc/nginx/
- ./staticfiles:/usr/src/app/staticfiles
- ./mediafiles:/usr/src/app/mediafiles
- ./private_media:/usr/src/app/private_media
- ./docs-static:/usr/src/app/docs-static
- ./logs:/var/log/nginx
depends_on:
- app
# volumes_from:
# - app
# links:
# - app:app
# logging:
# driver: "json-file" # defaults if not specified
# options:
# max-size: "10m"
# max-file: "5"
volumes:
dbdata:
#-------------------------------------------------------------------------------------------------