-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yaml
More file actions
42 lines (41 loc) · 1.45 KB
/
compose.yaml
File metadata and controls
42 lines (41 loc) · 1.45 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
# SPDX-FileCopyrightText: Copyright (C) 2021 Opal Health Informatics Group at the Research Institute of the McGill University Health Centre <john.kildea@mcgill.ca>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
services:
db:
image: mariadb:10.11.16-jammy
environment:
- MARIADB_RANDOM_ROOT_PASSWORD=yes
- MARIADB_USER=${DATABASE_USER}
- MARIADB_PASSWORD=${DATABASE_PASSWORD}
- MARIADB_DATABASE=${DATABASE_NAME}
- MYSQL_TCP_PORT=${DATABASE_PORT}
volumes:
- ./docker/mariadb/scripts:/docker-entrypoint-initdb.d
# expose DB locally to be able to access it through venv
ports:
- ${DATABASE_PORT}:${DATABASE_PORT}
app:
build:
context: .
args:
# install development dependencies in the local image
- ENV=dev
command: python manage.py runserver 0:8000
env_file:
- .env
environment:
# overwrite for container to allow both container and local venv
# for linux users, you can replace the host.docker.internal by 172.17.0.1 which is the
# default docker address, because host.docker.internal does not work in linux - docker-compose
- DATABASE_HOST=db
- LEGACY_DATABASE_HOST=host.docker.internal
# TODO: use compose watch feature instead: https://docs.docker.com/compose/how-tos/file-watch/
volumes:
- ./opal:/app/opal
- ./config:/app/config
- ./locale:/app/locale
ports:
- 8000:8000
depends_on:
- db