-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
101 lines (94 loc) · 2.6 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
# Copyright (c) Atreya Shankar
# Distributed under the terms of the MIT License.
# Copyright (c) Jupyter Development Team
# Distributed under the terms of the Modified BSD License.
version: "3"
services:
mariadb:
image: docker.io/bitnami/mariadb:10.6
container_name: moodle-db
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_moodle
- MARIADB_DATABASE=bitnami_moodle
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATE=utf8mb4_unicode_ci
volumes:
- "moodle-db-data:${MOODLE_DB_VOLUME_CONTAINER}"
moodle:
image: docker.io/bitnami/moodle:3
container_name: moodle
ports:
- "80:8080"
environment:
- MOODLE_USERNAME=${ADMIN}
- MOODLE_PASSWORD=password
- MOODLE_DATABASE_HOST=mariadb
- MOODLE_DATABASE_PORT_NUMBER=3306
- MOODLE_DATABASE_USER=bn_moodle
- MOODLE_DATABASE_NAME=bitnami_moodle
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- "moodle-main-data:${MOODLE_MAIN_VOLUME_CONTAINER}"
- "moodle-other-data:${MOODLE_OTHER_VOLUME_CONTAINER}"
depends_on:
- mariadb
hub-db:
image: postgres:9.6
container_name: jupyterhub-db
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: ${JH_DB_VOLUME_CONTAINER}
env_file:
- jupyterhub/secrets/postgres.env
volumes:
- "jupyterhub-db-data:${JH_DB_VOLUME_CONTAINER}"
hub:
depends_on:
- hub-db
build:
context: ./jupyterhub
dockerfile: Dockerfile
args:
JUPYTERHUB_VERSION: ${JUPYTERHUB_VERSION}
restart: always
image: jupyterhub
container_name: jupyterhub
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw"
- "jupyterhub-data:${JH_DATA_VOLUME_CONTAINER}"
ports:
- "8080:8080"
links:
- hub-db
environment:
DOCKER_NETWORK_NAME: ${DOCKER_NETWORK_NAME}
DOCKER_NOTEBOOK_IMAGE: ${LOCAL_NOTEBOOK_NAME}
DOCKER_NOTEBOOK_DIR: ${DOCKER_NOTEBOOK_DIR}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_HOST: hub-db
env_file:
- jupyterhub/secrets/postgres.env
command: >
jupyterhub -f /srv/jupyterhub/jupyterhub_config.py
volumes:
jupyterhub-data:
name: ${JH_DATA_VOLUME_HOST}
external: true
jupyterhub-db-data:
name: ${JH_DB_VOLUME_HOST}
external: true
moodle-db-data:
name: ${MOODLE_DB_VOLUME_HOST}
external: true
moodle-main-data:
name: ${MOODLE_MAIN_VOLUME_HOST}
external: true
moodle-other-data:
name: ${MOODLE_OTHER_VOLUME_HOST}
external: true
networks:
default:
name: ${DOCKER_NETWORK_NAME}