diff --git a/pica-etherpad/Dockerfile b/pica-etherpad/Dockerfile index dff9e0b5a9afba4427f2244acdb80487c11b4719..87c5d1e6e1bc28cc3710bd8e673a47b7618bb073 100644 --- a/pica-etherpad/Dockerfile +++ b/pica-etherpad/Dockerfile @@ -75,5 +75,4 @@ HEALTHCHECK --interval=20s --timeout=3s CMD curl --fail http://localhost:8080 || WORKDIR /opt/etherpad-lite/ USER etherpad -ENTRYPOINT ["/opt/etherpad-lite/entrypoint.sh"] -CMD [ "/bin/bash", "-c", "/opt/etherpad-lite/bin/run.sh" ] +ENTRYPOINT ["/opt/etherpad-lite/entrypoint.sh", "/bin/bash", "-c", "/opt/etherpad-lite/bin/run.sh" ] diff --git a/pica-etherpad/docker-compose.yml b/pica-etherpad/docker-compose.yml index 7f83797ec63995bf8409e18f139c5a483114d1f8..692d370c39552bae1e0150de48954c14e917d9a5 100755 --- a/pica-etherpad/docker-compose.yml +++ b/pica-etherpad/docker-compose.yml @@ -11,6 +11,10 @@ volumes: name: deleted-pads-week etherpad-api-key-week: name: etherpad-api-key-week + api-key-standard: + name: etherpad-api-key-standard + api-key-week: + name: etherpad-api-key-week networks: @@ -67,10 +71,11 @@ services: container_name: etherpad-week-app build: . env_file: ./secrets/etherpad-week-app.secrets + command: ["--apikey", "/mountedAPIkey/APIKEY.txt"] volumes: - ./settings_week.json:/opt/etherpad-lite/settings.json - deleted-pads-week:/opt/etherpad-lite/deleted_pads - - /DATA/docker/etherpad/week/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt + - api-key-week:/mountedAPIkey labels: traefik.http.routers.etherpad-week-app.entrypoints: websecure traefik.http.routers.etherpad-week-app.rule: Host(`week.pad.picasoft.net`) @@ -105,13 +110,16 @@ services: etherpad-week-delete-pad-after-delay: build: context: https://gitlab.utc.fr/picasoft/projets/delete-pad-after-delay.git - volumes: - - type: bind #we can't use volume for a single file (and we don't want to put the whole /opt/ep on a volume). Make sure that /DATA/docker/... is only accesible by root! This could be improved if APIKEY was stored in a directory. - source: /DATA/docker/etherpad/week/APIKEY.txt - target: /APIKEY.txt - read_only: True + volumes: + - type: volume + source: api-key-week + target: /mountedAPIkey + read_only: true + volume: + nocopy: true environment: URL: "https://week.pad.picasoft.net" DEL: 1209600 #14 days. MUST be COHERENT with settings_week.json ep_delete_after_delay{ DIR: "/opt/etherpad-lite/deleted_pads" + APIKEY_PATH: "/mountedAPIkey/APIKEY.txt" container_name: etherpad-week-delete-pad-after-delay