Merge pull request 'Cleanup' (#3) from cleanup into master

Reviewed-on: Aurore/docker-ovh#3
Reviewed-by: jeltz <jeltz@noreply.localhost>
This commit is contained in:
otthorn 2021-03-22 23:48:41 +01:00
commit b009ac7333
15 changed files with 113 additions and 107 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "kanbot"]
path = kanbot
url = https://gitea.auro.re/aurore/kanbot

View file

@ -13,11 +13,12 @@ tout en vérifiant qu'il n'est lisible que par root.
## Map des ports
* 8080 -> Riot Web (chat)
* 8080 -> Element Web (chat)
* 8081 -> CodiMD
* 8082 -> Grafana
* 8083 -> PrivateBin (paste)
* 8084 -> EtherPad (pad)
* 8085 -> Django CAS server (cas)
* 8086 -> ShareLaTeX
* 8086 -> Statping (status page)
* 8087 -> Docker exporter
* 8088 -> Kanboard

View file

@ -27,10 +27,10 @@ DEBUG = os.getenv('DJANGO_DEBUG', False)
ALLOWED_HOSTS = [os.getenv('DJANGO_HOST')]
# Suivi des erreurs sur root@
# Suivi des erreurs sur la ML monitoring
EMAIL_SUBJECT_PREFIX = "[CAS] "
ADMINS = (
('Intranet', 'root@crans.org'),
('Intranet', 'monitoring.aurore@lists.crans.org'),
)
# Application definition

View file

@ -17,7 +17,7 @@ from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('cas_server.urls', namespace="cas_server")),
url(r'admin/', admin.site.urls),
url(r'', include('cas_server.urls', namespace="cas_server")),
]

View file

@ -1,4 +1,5 @@
django-cas-server
gunicorn
ldap3
psycopg2
whitenoise

View file

@ -1,29 +1,35 @@
---
version: "3"
services:
##################################################
# DATABASES #
##################################################
mongo:
image: mongo:4.2
restart: always
volumes:
- ./mongo_data:/data/db
redis:
image: redis:5.0
restart: always
volumes:
- ./redis_data:/data
riot:
build: riot
element:
build: element
restart: always
ports:
- 8080:80
hedgedoc:
build: hedgedoc
restart: always
environment:
CMD_DB_URL: "${CODIMD_DB_URL}"
CMD_LDAP_BINDCREDENTIALS: "${CODIMD_LDAP_BINDCREDENTIALS}"
volumes:
- ./codimd_uploads_data:/hedgedoc/public/uploads
ports:
- 8081:3000
grafana:
build: grafana
restart: always
environment:
ENV_PASSWORD: "${GRAFANA_LDAP_PASSWORD}"
volumes:
- ./grafana_data:/var/lib/grafana
ports:
- 8082:3000
privatebin:
image: privatebin/nginx-fpm-alpine:1.3.4
restart: always
@ -36,19 +42,67 @@ services:
build: etherpad
restart: always
environment:
- "POSTGRES_PASSWORD=${ETHERPAD_POSTGRES_PASSWD}"
POSTGRES_PASSWORD: "${ETHERPAD_DB_PASSWORD}"
ports:
- 8084:9001
grafana:
build: grafana
cas:
build: django-cas-server
restart: always
environment:
- "ENV_PASSWORD=${GRAFANA_LDAP_BIND_PASSWD}"
volumes:
- ./grafana_data:/var/lib/grafana
DJANGO_DB_PASSWORD: "${DJANGO_CAS_DB_PASSWORD}"
DJANGO_SECRET_KEY: "${DJANGO_CAS_SECRET_KEY}"
DJANGO_CAS_LDAP_PASSWORD: "${DJANGO_CAS_LDAP_PASSWORD}"
ports:
- 8082:3000
- 8085:8000
statping:
image: statping/statping:v0.90.74
restart: always
environment:
DB_CONN: sqlite
volumes:
- ./statping_data:/app
ports:
- 8086:8080
docker_exporter:
image: prometheusnet/docker_exporter
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- "8087:9417"
kanboard:
image: kanboard/kanboard:v1.2.18
environment:
LDAP_AUTH: "true"
LDAP_SERVER: ldap://10.128.0.149
LDAP_BIND_TYPE: proxy
LDAP_USERNAME: "cn=kanboard,ou=service-users,dc=auro,dc=re"
LDAP_PASSWORD: "${KANBOARD_LDAP_PASSWORD}"
LDAP_USER_BASE_DN: "cn=Utilisateurs,dc=auro,dc=re"
LDAP_USER_FILTER: "(&(objectClass=posixAccount)(uid=%s))"
LDAP_GROUP_PROVIDER: "false"
DB_DRIVER: postgres
DB_HOSTNAME: 10.128.0.96
DB_NAME: kanboard
DB_USERNAME: kanboard
DB_PASSWORD: "${KANBOARD_DB_PASSWORD}"
ENABLE_XFRAME: "false"
DEBUG: "false"
volumes:
- ./kanboard_data:/var/www/app/data
- ./kanboard_plugins:/var/www/app/plugins
ports:
- 8088:80
kanbot:
build: kanbot
restart: always
volumes:
- ./kanbot_config/config.yaml:/var/www/kanbot/config.yaml:ro
matrix-appservice-discord:
image: halfshot/matrix-appservice-discord:v1.0.0
@ -69,58 +123,5 @@ services:
build: prometheus-alertmanager-discord
restart: always
environment:
- "DISCORD_WEBHOOK=${PROMETHEUS_DISCORD_WEBHOOK}"
postgres:
# Don't upgrade PostgreSQL by simply changing the version number
# You need to migrate the Database to the new PostgreSQL version
# When creating for the first time,
# you need to create codimd and cas users and databases.
image: postgres:9.6-alpine
restart: always
environment:
- POSTGRES_USER=postgres
- "POSTGRES_PASSWD=${POSTGRES_PASSWD}"
volumes:
- ./postgres_data:/var/lib/postgresql/data
codimd:
build: codimd
restart: always
environment:
- "CMD_DB_URL=${CODIMD_DB_URL}"
- "CMD_LDAP_BINDCREDENTIALS=${CODIMD_LDAP_BINDCREDENTIALS}"
ports:
- "8081:3000"
volumes:
- ./codimd_uploads_data:/hedgedoc/public/uploads
docker_exporter:
image: prometheusnet/docker_exporter
restart: always
ports:
- "8087:9417"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
# cas:
# build: django-cas-server
# restart: always
# environment:
# DJANGO_DB_PASSWORD: "${DJANGO_CAS_DB_PASSWORD}"
# DJANGO_SECRET_KEY: "${DJANGO_CAS_SECRET_KEY}"
# DJANGO_CAS_LDAP_PASSWORD: "${DJANGO_CAS_LDAP_PASSWORD}"
# ports:
# - "8085:8000"
# depends_on:
# - postgres
statping:
image: statping/statping:v0.90.74
restart: always
ports:
- 8086:8080
volumes:
- ./statping_data:/app
environment:
DB_CONN: sqlite
DISCORD_WEBHOOK: "${PROMETHEUS_DISCORD_WEBHOOK}"
...

6
element/Dockerfile Normal file
View file

@ -0,0 +1,6 @@
FROM vectorim/element-web:v1.7.23
# Customize instance settings and background
COPY config.json /app/config.json
COPY background.jpg /app/background.jpg
COPY logo.png /app/logo.png

View file

Before

Width:  |  Height:  |  Size: 454 KiB

After

Width:  |  Height:  |  Size: 454 KiB

View file

@ -14,7 +14,12 @@
"disable_3pid_login": true,
"brand": "Riot",
"branding": {
"welcomeBackgroundUrl": "/bg.jpg"
"welcomeBackgroundUrl": "/background.jpg",
"authHeaderLogoUrl": :"/logo.png",
"authFooterLinks": [
{"text": "Site Web", "url": "https://auro.re"},
{"text": "Intranet", "url": "https://intranet.auro.re"},
{"text": "Email support", "url": "mailto:support.aurore@lists.crans.org"}
},
"integrations_ui_url": "",
"integrations_rest_url": "",
@ -44,10 +49,6 @@
},
"welcomeUserId": "@riot-bot:matrix.org",
"piwik": false,
"permalinkPrefix": "https://auro.re",
"enable_presence_by_hs_url": {
"https://matrix.org": false
},
"settingDefaults": {
"breadcrumbs": true
},

BIN
element/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1,5 +1,11 @@
# Copy this as .env and make it only readable by root
ETHERPAD_POSTGRES_PASSWD=CHANGE ME
GRAFANA_LDAP_BIND_PASSWD=CHANGE ME
ETHERPAD_DB_PASSWORD=CHANGE ME
GRAFANA_LDAP_PASSWORD=CHANGE ME
PROMETHEUS_DISCORD_WEBHOOK=CHANGE ME
CODIMD_LDAP_BINDCREDENTIALS=CHANGE ME
DJANGO_CAS_DB_PASSWORD=CHANGE ME
DJANGO_CAS_SECRET_KEY=CHANGE ME
DJANGO_CAS_LDAP_PASSWORD=CHANGE ME
CODIMD_DB_URL=CHANGE ME
KANBOARD_LDAP_PASSWORD=CHANGE ME
KANBOARD_DB_PASSWORD=CHANGE ME

1
kanbot Submodule

@ -0,0 +1 @@
Subproject commit 95cabfb36d34da267c79ef671231710697493364

View file

@ -1,5 +0,0 @@
FROM vectorim/element-web:v1.7.22
# Customize instance settings and background
COPY config.json /app/config.json
COPY bg.jpg /app/bg.jpg

View file

@ -1,9 +0,0 @@
FROM sharelatex/sharelatex:2.2.0
ENV SHARELATEX_APP_NAME="ShareLaTeX Aurore"
ENV SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex
ENV SHARELATEX_REDIS_HOST=redis
ENV REDIS_HOST=redis
ENV ENABLED_LINKED_FILE_TYPES=url,project_file
ENV SHARELATEX_SITE_URL=https://sharelatex.auro.re
ENV SHARELATEX_ADMIN_EMAIL=root@localhost