forked from DDMAL/CantusDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev-containers.yml
60 lines (56 loc) · 1.62 KB
/
docker-compose-dev-containers.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
# This file is configured for deployment of the CantusDB project in local development.
# When building the project locally, replace the contents of docker-compose.yml with the
# contents of this file.
services:
django:
build:
context: ./
dockerfile: ./django/Dockerfile
args:
PROJECT_ENVIRONMENT: DEVELOPMENT
container_name: cantusdb-django-1
volumes:
- ./:/code/cantusdb_project
- static_volume:/resources/static
- media_volume:/resources/media
- api_cache_volume:/resources/api_cache
env_file: ./config/envs/dev_env
ports:
- 3000:3000 # this mapping allows the VSCode Dev Containers extension to work
restart: always
depends_on:
- postgres
working_dir: /code/cantusdb_project/django/cantusdb_project
command: [ "python", "manage.py", "runserver_plus", "0:8000" ]
nginx:
build:
context: ./nginx
ports:
- 80:80
- 443:443
container_name: cantusdb-nginx-1
volumes:
- ./config/nginx/conf.d:/etc/nginx/conf.d
- static_volume:/resources/static
- media_volume:/resources/media
- api_cache_volume:/resources/api_cache
- ./certificates:/etc/nginx/ssl/live
restart: always
depends_on:
- django
postgres:
build:
context: ./postgres
env_file: ./config/envs/dev_env
container_name: cantusdb-postgres-1
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- 5432:5432
restart: always
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
volumes:
postgres_data:
static_volume:
media_volume:
api_cache_volume: