Add Dockerfile and first attempt at CI

This commit is contained in:
Yaakov 2022-05-29 22:02:51 +10:00
parent 0245ab71c8
commit 4915208029
3 changed files with 57 additions and 1 deletions

40
.drone.yml Normal file
View file

@ -0,0 +1,40 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry:
from_secret: docker-registry
username:
from_secret: docker-username
password:
from_secret: docker-password
repo: public/pe1chl-elproxy
tags:
- latest
---
kind: secret
name: docker-registry
get:
path: kv/data/drone-ci/yaakov/docker-registry
name: registry
---
kind: secret
name: docker-username
get:
path: kv/data/drone-ci/yaakov/docker-registry
name: username
---
kind: secret
name: docker-password
get:
path: kv/data/drone-ci/yaakov/docker-registry
name: password

10
Dockerfile Normal file
View file

@ -0,0 +1,10 @@
FROM alpine:latest as build
RUN apk --no-cache add make gcc musl-dev linux-headers nettle-dev
WORKDIR /build
COPY . /build
RUN make
FROM alpine:latest as runtime
RUN apk --no-cache add nettle
COPY --from=build /build/elproxy /app/elproxy
CMD [ "sh", "-c", "/app/elproxy $ELPROXY_CONFIG $ELPROXY_DEBUG" ]

8
README
View file

@ -1,4 +1,4 @@
Echolink Proxy/Relay server - PE1CHL # Echolink Proxy/Relay server - PE1CHL
This Echolink Proxy/Relay server can run multiple echolink proxies and/or This Echolink Proxy/Relay server can run multiple echolink proxies and/or
relays on a single machine, provided it has multiple IPv4 addresses on the relays on a single machine, provided it has multiple IPv4 addresses on the
@ -114,3 +114,9 @@ graph the statistiscs like number of used proxies.
When this file disappears for no apparent reason, it probably is systemd When this file disappears for no apparent reason, it probably is systemd
doing it. doing it.
Configure RemoveIPC=no in /etc/systemd/logind.conf to keep it at bay. Configure RemoveIPC=no in /etc/systemd/logind.conf to keep it at bay.
# Docker image instructions - VK2BSD
To run this container, mount your configuration file, then set the following environment variables:
- `ELPROXY_CONFIG` to the path to your configuration file
- `ELPROXY_DEBUG` (optional) to a non-zero value to enable debug output logging
Make sure to set `Daemonize=0` in your configuration file, otherwise the container will simply exit.