Skip to content
Snippets Groups Projects
Verified Commit 2909f44b authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye
Browse files

[CodiMD] Change URL and make crontab configurable

parent d00ea058
No related branches found
No related tags found
No related merge requests found
......@@ -46,8 +46,6 @@ COPY --chown=5010:5010 --from=BUILD /opt/codimd .
COPY --chown=5010:5010 deleteOldPad.py .
COPY crontab .
RUN npm install --production && npm cache clean --force && rm -rf /tmp/{core-js-banners,phantomjs}
COPY entrypoint.sh .
......
0 0 * * * /home/codimd/app/deleteOldPad.py
......@@ -49,12 +49,13 @@ services:
OLD_INTERVAL: "2 years"
DB_HOST: "codimd-db"
DB_PORT: 5432
DELETE_AT: "0 0 * * *"
networks:
- proxy
- codimd
labels:
traefik.http.routers.codimd-app.entrypoints: websecure
traefik.http.routers.codimd-app.rule: Host(`codimd.picasoft.net`)
traefik.http.routers.codimd-app.rule: Host(`md.picasoft.net`)
traefik.http.services.codimd-app.loadbalancer.server.port: 3000
traefik.enable: true
restart: unless-stopped
#! /bin/sh
cat << EOF > /home/codimd/app/crontab
$DELETE_AT /home/codimd/app/deleteOldPad.py
EOF
sed "154a | <a href=\"https://picasoft.net/co/cgu.html\">CGU</a> " -i /home/codimd/app/public/views/index/body.ejs
sed "41a <span style=\"font-size:2em;font-weight:bold;\">Cette instance ne garde le contenu que deux ans après la dernière modification !</span>" -i /home/codimd/app/public/views/index/body.ejs
/home/codimd/app/docker-entrypoint.sh &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment