Skip to content
Snippets Groups Projects
Commit bfd476ff authored by Igor Witz's avatar Igor Witz
Browse files

corrections de bugs

parent 1c55bea8
Branches
No related tags found
1 merge request!9Correction vulnerabilites pica etherpad
...@@ -32,7 +32,6 @@ RUN curl -SL https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}. ...@@ -32,7 +32,6 @@ RUN curl -SL https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}.
rm -Rf etherpad.zip etherpad-lite-${ETHERPAD_VERSION}/.git && \ rm -Rf etherpad.zip etherpad-lite-${ETHERPAD_VERSION}/.git && \
mv etherpad-lite-${ETHERPAD_VERSION}/* . && \ mv etherpad-lite-${ETHERPAD_VERSION}/* . && \
mkdir -p src/templates && \ mkdir -p src/templates && \
mkdir -p static && \
bin/installDeps.sh && \ bin/installDeps.sh && \
rm settings.json && \ rm settings.json && \
npm install \ npm install \
...@@ -53,16 +52,16 @@ RUN curl -SL https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}. ...@@ -53,16 +52,16 @@ RUN curl -SL https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION}.
git clone https://framagit.org/DeBugs/picasoft-etherpad-landing-page.git src/templates/picasoft-etherpad-landing-page && \ git clone https://framagit.org/DeBugs/picasoft-etherpad-landing-page.git src/templates/picasoft-etherpad-landing-page && \
git --git-dir=src/templates/picasoft-etherpad-landing-page/.git checkout ${ETHERPAD_LANDING_PAGE_VERSION} && \ git --git-dir=src/templates/picasoft-etherpad-landing-page/.git checkout ${ETHERPAD_LANDING_PAGE_VERSION} && \
cp src/templates/picasoft-etherpad-landing-page/index.html src/templates/index.html && \ cp src/templates/picasoft-etherpad-landing-page/index.html src/templates/index.html && \
cp src/templates/picasoft-etherpad-landing-page/static/* static/ -r cp src/templates/picasoft-etherpad-landing-page/static/* src/static/ -r
# construction de l'image finale # construction de l'image finale
FROM base FROM base
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /opt/etherpad-lite/entrypoint.sh
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y mysql-client && \ apt-get install -y mysql-client && \
chmod +x /entrypoint.sh && \ chmod +x /opt/etherpad-lite/entrypoint.sh && \
mkdir -p /opt/etherpad-lite && \ mkdir -p /opt/etherpad-lite && \
chown -R node /opt/etherpad-lite && \ chown -R node /opt/etherpad-lite && \
usermod -d /opt/etherpad-lite node && \ usermod -d /opt/etherpad-lite node && \
...@@ -71,7 +70,8 @@ RUN apt-get update && \ ...@@ -71,7 +70,8 @@ RUN apt-get update && \
# import des fichiers téléchargés dans l'image downloader # import des fichiers téléchargés dans l'image downloader
COPY --from=downloader --chown=node /opt/etherpad-lite /opt/etherpad-lite/ COPY --from=downloader --chown=node /opt/etherpad-lite /opt/etherpad-lite/
ENTRYPOINT ["/entrypoint.sh"] USER node
ENTRYPOINT ["/opt/etherpad-lite/entrypoint.sh"]
CMD /bin/bash -c "/opt/etherpad-lite/bin/run.sh" CMD /bin/bash -c "/opt/etherpad-lite/bin/run.sh"
HEALTHCHECK CMD curl -s 127.0.0.1:${ETHERPAD_PORT:=8080} HEALTHCHECK CMD curl -s 127.0.0.1:${ETHERPAD_PORT:=8080}
......
...@@ -39,9 +39,9 @@ if [ "$RESULT" != $ETHERPAD_DB_NAME ]; then ...@@ -39,9 +39,9 @@ if [ "$RESULT" != $ETHERPAD_DB_NAME ]; then
-e "create database ${ETHERPAD_DB_NAME}" -e "create database ${ETHERPAD_DB_NAME}"
fi fi
if [ ! -f settings.json ]; then if [ ! -f /opt/etherpad-lite/settings.json ]; then
cat <<- EOF > settings.json cat <<- EOF > /opt/etherpad-lite/settings.json
{ {
"title": "${ETHERPAD_TITLE}", "title": "${ETHERPAD_TITLE}",
"ip": "0.0.0.0", "ip": "0.0.0.0",
...@@ -60,7 +60,7 @@ if [ ! -f settings.json ]; then ...@@ -60,7 +60,7 @@ if [ ! -f settings.json ]; then
: ${ETHERPAD_ADMIN_USER:=admin} : ${ETHERPAD_ADMIN_USER:=admin}
cat <<- EOF >> settings.json cat <<- EOF >> /opt/etherpad-lite/settings.json
"users": { "users": {
"${ETHERPAD_ADMIN_USER}": { "${ETHERPAD_ADMIN_USER}": {
"password": "${ETHERPAD_ADMIN_PASSWORD}", "password": "${ETHERPAD_ADMIN_PASSWORD}",
...@@ -70,7 +70,7 @@ if [ ! -f settings.json ]; then ...@@ -70,7 +70,7 @@ if [ ! -f settings.json ]; then
EOF EOF
fi fi
cat <<- EOF >> settings.json cat <<- EOF >> /opt/etherpad-lite/settings.json
} }
EOF EOF
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment