Merge pull request #1367 from itishermann/main

[+] Template: Kuzzle, Moodle, Sonarqube, RabbitMQ
This commit is contained in:
Andras Bacsai 2023-10-27 13:16:52 +02:00 committed by GitHub
commit 55891d7001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 154 additions and 0 deletions

View File

@ -0,0 +1,63 @@
# documentation: https://docs.kuzzle.io/
# slogan: Kuzzle is a generic backend offering the basic building blocks common to every application.
# tags: backend, api, realtime, websocket, mqtt, rest, sdk, iot, geofencing, low-code
services:
redis:
image: redis:6.2.4
command: redis-server --appendonly yes
container_name: kuzzle_redis
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 1s
timeout: 3s
retries: 30
elasticsearch:
image: kuzzleio/elasticsearch:7
container_name: kuzzle_elasticsearch
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9200" ]
interval: 2s
timeout: 2s
retries: 10
ulimits:
nofile: 65536
kuzzle:
image: kuzzleio/kuzzle:latest
environment:
- SERVICE_FQDN_KUZZLE_7512
- kuzzle_services__storageEngine__client__node=http://elasticsearch:9200
- kuzzle_services__storageEngine__commonMapping__dynamic=true
- kuzzle_services__internalCache__node__host=redis
- kuzzle_services__memoryStorage__node__host=redis
- kuzzle_server__protocols__mqtt__enabled=true
- kuzzle_server__protocols__mqtt__developmentMode=false
- kuzzle_limits__loginsPerSecond=50
# - NODE_ENV=${NODE_ENV:-development}
- NODE_ENV=production
# - DEBUG=${DEBUG:-kuzzle:*,-kuzzle:network:protocols:websocket,-kuzzle:events}
- DEBUG=${DEBUG:-kuzzle:cluster:sync}
- DEBUG_DEPTH=${DEBUG_DEPTH:-0}
- DEBUG_MAX_ARRAY_LENGTH=${DEBUG_MAX_ARRAY:-100}
- DEBUG_EXPAND=${DEBUG_EXPAND:-off}
- DEBUG_SHOW_HIDDEN={$DEBUG_SHOW_HIDDEN:-on}
- DEBUG_COLORS=${DEBUG_COLORS:-on}
cap_add:
- SYS_PTRACE
ulimits:
nofile: 65536
sysctls:
- net.core.somaxconn=8192
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:7512/_healthcheck" ]
timeout: 1s
interval: 2s
retries: 30
depends_on:
redis:
condition: service_healthy
elasticsearch:
condition: service_healthy

View File

@ -0,0 +1,39 @@
# documentation: https://moodle.org
# slogan: Moodle is the worlds most customisable and trusted eLearning solution that empowers educators to improve our world.
# tags: moodle, elearning, education, lms, cms, open, source, low, code
services:
mariadb:
image: mariadb:11.1
environment:
- ALLOW_EMPTY_PASSWORD=no
- MYSQL_ROOT_PASSWORD=$SERVICE_PASSWORD_ROOT
- MYSQL_DATABASE=bitnami_moodle
- MYSQL_USER=$SERVICE_USER_MARIADB
- MYSQL_PASSWORD=$SERVICE_PASSWORD_MARIADB
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATE=utf8mb4_unicode_ci
volumes:
- mariadb-data:/var/lib/mysql
moodle:
image: docker.io/bitnami/moodle:4.3
environment:
- MOODLE_DATABASE_HOST=mariadb
- MOODLE_DATABASE_PORT_NUMBER=3306
- MOODLE_DATABASE_USER=$SERVICE_USER_MARIADB
- MOODLE_DATABASE_NAME=bitnami_moodle
- MOODLE_DATABASE_PASSWORD=$SERVICE_PASSWORD_MARIADB
- ALLOW_EMPTY_PASSWORD=no
- SERVICE_FQDN_MOODLE_8080
- SERVICE_FQDN_MOODLE_8443
- MOODLE_USERNAME=$SERVICE_USER_MOODLE
- MOODLE_PASSWORD=$SERVICE_PASSWORD_MOODLE
- MOODLE_EMAIL=user@example.com
- MOODLE_SITE_NAME=${MOODLE_SITE_NAME:-New Site}
volumes:
- moodle_data:/bitnami/moodle
- moodledata_data:/bitnami/moodledata
depends_on:
- mariadb

View File

@ -0,0 +1,17 @@
# documentation: https://www.rabbitmq.com/documentation.html
# slogan: With tens of thousands of users, RabbitMQ is one of the most popular open source message brokers
# tags: message broker, message queue, message-oriented middleware, MOM, AMQP, MQTT, STOMP, messaging
services:
rabbitmq:
image: rabbitmq:3.8-management
environment:
- SERVICE_FQDN_RABBITMQ_15672
- SERVICE_FQDN_RABBITMQ_5672
- RABBITMQ_DEFAULT_USER=$SERVICE_USER_RABBITMQ
- RABBITMQ_DEFAULT_PASS=$SERVICE_PASSWORD_RABBITMQ
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3

View File

@ -0,0 +1,35 @@
# documentation: https://hub.docker.com/_/sonarqube/
# slogan: SonarQube is a self-managed, automatic code review tool that systematically helps you deliver Clean Code
# tags: sonarqube, code-review, clean-code, quality, code-quality, code-analysis, code-smells, code-coverage, code-security
services:
sonarqube:
image: sonarqube:community
hostname: sonarqube
container_name: sonarqube
environment:
- SONAR_JDBC_URL=jdbc:postgresql://postgresql:5432/${POSTGRES_DB:-sonar}
- SONAR_JDBC_USERNAME=$SERVICE_USER_POSTGRES
- SONAR_JDBC_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- SERVICE_FQDN_SONARQUBE_9000
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
depends_on:
postgresql:
condition: service_healthy
postgresql:
image: postgres:15-alpine
volumes:
- postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=$SERVICE_USER_POSTGRES
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- POSTGRES_DB=${POSTGRES_DB:-sonar}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 20s
retries: 10