moving docker files into server dirctory, building docker image from checked out code, mergeing Server Readme.md and adding notes regarding docker-compose networking
This commit is contained in:
parent
7682ee3628
commit
5602150ef2
6 changed files with 42 additions and 19 deletions
|
|
@ -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
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
version: '2'
|
||||
services:
|
||||
pdfdraw-server:
|
||||
build:
|
||||
context: .
|
||||
environment:
|
||||
port: 8080
|
||||
secret: 'the-shared-secret'
|
||||
|
|
@ -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
|
||||
|
|
|
|||
16
server/docker-compose.yml
Executable file
16
server/docker-compose.yml
Executable file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
Loading…
Reference in a new issue