-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
131 lines (122 loc) Β· 3.1 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: '3.8'
services:
node:
image: node:20
user: node
working_dir: /app
entrypoint: /bin/sh
command: -c 'npm install && npm run watch'
depends_on:
- php
volumes:
- "./:/app"
- "$HOME/.npmrc:/home/node/.npmrc"
php:
build:
dockerfile: docker/php/Dockerfile
context: .
target: php_dev
user: "${UID:-0}:${GID:-0}"
command:
- php-fpm
- -d xdebug.client_host=host.docker.internal
environment:
PHP_CS_FIXER_IGNORE_ENV: 1
depends_on:
- postgres
volumes:
- ".:/app:cached"
- "./var/cache:/app/var/cache:delegated"
- "./var/log:/app/var/log:delegated"
- "./vendor:/app/vendor:delegated"
nginx:
networks:
default:
aliases:
- tutorat-local.paris-saclay.fr
extra_hosts:
- "host.docker.internal:host-gateway"
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
target: nginx_dev
depends_on:
- php
environment:
PHP_BACKEND: php
volumes:
- "./docker/nginx/default-dev.conf.template:/etc/nginx/templates/default.conf.template:cached"
- ".:/app:cached"
ports:
- ${FRONT_PORT:-80}:80
- ${FRONT_PORT_HTTPS:-443}:443
postgres:
image: postgres:15-alpine
restart: on-failure
volumes:
- db-data:/var/lib/postgresql/data:rw
environment:
POSTGRES_USER: tutorat
POSTGRES_PASSWORD: tutorat
POSTGRES_DB: tutorat-db
POSTGRES_INITDB_ARGS: "--locale-provider=icu --icu-locale=sl-SI"
ports:
- ${DATABASE_PORT:-5432}:5432
postgres-test:
image: postgres:15-alpine
restart: on-failure
environment:
POSTGRES_USER: tutorat
POSTGRES_PASSWORD: tutorat
POSTGRES_DB: tutorat-db
POSTGRES_INITDB_ARGS: "--locale-provider=icu --icu-locale=sl-SI"
ports:
- "5433:5432"
redis:
image: redis:7.0.12
restart: on-failure
command: redis-server --requirepass redis_password
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis-data:/data
mariadb:
image: docker.io/bitnami/mariadb:latest
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_moodle
- MARIADB_DATABASE=bitnami_moodle
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATE=utf8mb4_unicode_ci
volumes:
- 'mariadb_data:/bitnami/mariadb'
ports:
- "3306:3306"
moodle:
image: docker.io/bitnami/moodle:4.0.6
ports:
- '9180:8080'
- '9143:8443'
environment:
- MOODLE_DATABASE_HOST=mariadb
- MOODLE_DATABASE_PORT_NUMBER=3306
- MOODLE_DATABASE_USER=bn_moodle
- MOODLE_DATABASE_NAME=bitnami_moodle
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- BITNAMI_DEBUG=true
volumes:
- 'moodle_data:/bitnami/moodle'
- 'moodledata_data:/bitnami/moodledata'
depends_on:
- mariadb
volumes:
db-data:
redis-data:
mariadb_data:
driver: local
moodle_data:
driver: local
moodledata_data:
driver: local