diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index b2b6a05..0000000 --- a/docker/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# run pdfdraw backend in a docker container using docker-compose. - -all settings are exposed into enviroment variables. That means you are able to config the backend server in [docker-compose.yml](docker-compose.yml) yaml file by edting the corresponding enviroment variables. - -Than run docker compose. - - docker-compose up -d - diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml deleted file mode 100755 index af65c7f..0000000 --- a/docker/docker-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '2' -services: - pdfdraw-server: - build: - context: . - environment: - port: 8080 - secret: 'the-shared-secret' \ No newline at end of file diff --git a/server/README.md b/server/README.md index 69f19ac..1b89815 100644 --- a/server/README.md +++ b/server/README.md @@ -63,3 +63,27 @@ fields: - `author` (string): Optional author name to add to the annotation metadata. - `modified` (number): Optional timestamp (seconds since the epoch, in UTC) when the annotation was last modified. + +# run pdfdraw server in a docker container using docker-compose. + +all settings are exposed into enviroment variables. That means you are able to config the backend server in [docker-compose.yml](docker-compose.yml) yaml file by editing the corresponding enviroment variables. + +Based on your docker setup you still need to edit a few lines in the [docker-compose.yml](docker-compose.yml) file for networking. + +For example by exposing ports: + + ports: + - "8080:8080" + +or join an existing network: + + networks: + default: + external: + name: my-pre-existing-network + +For more details read [Networking in Compose](https://docs.docker.com/compose/networking/) + +Than run docker compose. + + docker-compose up -d diff --git a/server/docker-compose.yml b/server/docker-compose.yml new file mode 100755 index 0000000..c6778a6 --- /dev/null +++ b/server/docker-compose.yml @@ -0,0 +1,16 @@ +version: '2' +services: + pdfdraw-server: + build: + context: . + dockerfile: docker/Dockerfile + environment: + port: 8080 + secret: 'the-shared-secret' + #ports: + # - '8080:8080' + +#networks: +# default: +# external: +# name: my-pre-existing-network diff --git a/docker/Dockerfile b/server/docker/Dockerfile similarity index 54% rename from docker/Dockerfile rename to server/docker/Dockerfile index 90247e6..2e8e3b0 100644 --- a/docker/Dockerfile +++ b/server/docker/Dockerfile @@ -1,8 +1,7 @@ FROM nikolaik/python-nodejs:python3.9-nodejs15 -RUN wget -qO- https://github.com/strukturag/pdfdraw/archive/v0.1.2.tar.gz | tar -C /tmp -xvz --strip 1 -RUN cp -r /tmp/server /app -ADD config.js.docker /app/config.js +ADD . /app +ADD docker/config.js.docker /app/config.js RUN apt-get update || : && apt-get install pdftk python-pypdf2 -y diff --git a/docker/config.js.docker b/server/docker/config.js.docker similarity index 100% rename from docker/config.js.docker rename to server/docker/config.js.docker