Created
October 29, 2024 07:44
-
-
Save trangcongthanh/3e165430f692ad75c6ddbb4d7bd05601 to your computer and use it in GitHub Desktop.
Moodle Postgres Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
postgres: | |
image: postgres:16-alpine | |
environment: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: moodle | |
volumes: | |
- postgres_data:/data/postgresql | |
ports: | |
- 5432:5432 | |
restart: always | |
healthcheck: | |
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "moodle"] | |
interval: 5s | |
timeout: 10s | |
retries: 5 | |
moodle: | |
image: docker.io/bitnami/moodle:latest | |
ports: | |
- "80:8080" | |
- "443:8443" | |
environment: | |
- MOODLE_DATABASE_TYPE=pgsql | |
- MOODLE_DATABASE_HOST=postgres | |
- MOODLE_DATABASE_PORT_NUMBER=5432 | |
- MOODLE_DATABASE_USER=postgres | |
- MOODLE_DATABASE_PASSWORD=postgres | |
- MOODLE_DATABASE_NAME=moodle | |
# ALLOW_EMPTY_PASSWORD is recommended only for development. | |
- ALLOW_EMPTY_PASSWORD=yes | |
volumes: | |
- "moodle_data:/bitnami/moodle" | |
- "moodledata_data:/bitnami/moodledata" | |
depends_on: | |
- postgres | |
volumes: | |
postgres_data: | |
moodle_data: | |
moodledata_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment