Skip to content

Commit

Permalink
Update backend apis for 4 1 (#9)
Browse files Browse the repository at this point in the history
* Add docker support for examples

Signed-off-by: Teemu Piiroinen <teemu.piiroinen@wirepas.com>

* Update backend apis for WNT 4.1

Signed-off-by: Teemu Piiroinen <teemu.piiroinen@wirepas.com>
  • Loading branch information
teemupiiroinenwirepas committed Sep 24, 2021
1 parent 9cca0ed commit e89a2c5
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend-apis
2 changes: 1 addition & 1 deletion examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__pycache__
assets/*.tmp.*
settings.yml
/settings.yml
20 changes: 20 additions & 0 deletions examples/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM alpine:3.14

ARG base_folder=wnt_examples
ARG packet_name=wirepas-networktool-messaging
ARG project_name=wirepas-networktool-messaging-python
ARG settings_file=settings.yml

RUN apk add --no-cache bash python3 py3-pip git

RUN mkdir ${base_folder}
WORKDIR /${base_folder}

RUN pip3 install ${packet_name}

RUN git clone https://github.com/wirepas/${project_name}.git
WORKDIR /${base_folder}/${project_name}/examples

RUN pip3 install -r requirements.txt

ENTRYPOINT bash
14 changes: 14 additions & 0 deletions examples/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3.7'
services:
haproxy:
container_name: wnt_examples
image: wnt_examples:1.0.0
build:
context: .
dockerfile: Dockerfile
restart: always
stdin_open: true
tty: true

volumes:
- ./settings.yml:/wnt_examples/wirepas-networktool-messaging-python/examples/settings.yml
3 changes: 3 additions & 0 deletions examples/docker/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
username: "myusername"
password: "mypassword"
hostname: "myhost.mydomain.com"

0 comments on commit e89a2c5

Please sign in to comment.