Updated build for kiwiirc and webircgateway

master
Meliurwen 3 years ago
parent b245c88b16
commit a73648057e
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 7
      .env.example
  2. 2
      .gitignore
  3. 7
      docker-compose.yml
  4. 36
      kiwiirc/Dockerfile
  5. 37
      webircgateway/Dockerfile
  6. 4
      znc/root/etc/services.d/znc/run

@ -22,3 +22,10 @@ WI_RESTART=
# kiwiirc (optional) # kiwiirc (optional)
KI_CONTAINER_NAME= KI_CONTAINER_NAME=
KI_RESTART= KI_RESTART=
KI_BLD_IMG=
KI_BLD_TAG=
KI_BLD_REPO=
KI_BLD_VER=
KI_FNL_IMG=
KI_FNL_TAG=

2
.gitignore vendored

@ -1 +1 @@
.env *.env

@ -55,6 +55,13 @@ services:
kiwiirc: kiwiirc:
build: build:
context: kiwiirc/ context: kiwiirc/
args:
- BLD_IMG=${KI_BLD_IMG:-node}
- BLD_TAG=${KI_BLD_TAG:-15-alpine}
- BLD_REPO=${KI_BLD_REPO:-https://github.com/kiwiirc/kiwiirc.git}
- BLD_VER=${KI_BLD_VER:-master}
- FNL_IMG=${KI_FNL_IMG:-nginx}
- FNL_TAG=${KI_FNL_TAG:-stable}
container_name: ${KI_CONTAINER_NAME:-kiwiirc} container_name: ${KI_CONTAINER_NAME:-kiwiirc}
restart: ${KI_RESTART:-unless-stopped} restart: ${KI_RESTART:-unless-stopped}
volumes: volumes:

@ -1,13 +1,37 @@
FROM node:current-alpine AS builder # If you are wondering why the default args are set in the Dockerfile and in the
# docker-compose.yml see this: https://github.com/docker/compose/issues/3608
ARG BLD_IMG=${BLD_IMG:-node}
ARG BLD_TAG=${BLD_TAG:-15-alpine}
ARG BLD_REPO=${BLD_REPO:-https://github.com/kiwiirc/kiwiirc.git}
ARG BLD_VER=${BLD_VER:-master}
ARG FNL_IMG=${FNL_IMG:-nginx}
ARG FNL_TAG=${FNL_TAG:-stable}
RUN apk --update add git python3 make g++ && \ FROM ${BLD_IMG}:${BLD_TAG} AS builder
git clone --depth 1 https://github.com/kiwiirc/kiwiirc.git && \
cd kiwiirc && \ ARG BLD_REPO
yarn install && \ ARG BLD_VER
RUN apk --update add \
git \
python3 \
make \
g++
RUN git clone \
--depth 1 \
--single-branch \
--branch ${BLD_VER} \
${BLD_REPO} \
/kiwiirc
WORKDIR /kiwiirc
RUN yarn install && \
yarn run build yarn run build
FROM nginx:stable AS kiwiirc FROM ${FNL_IMG}:${FNL_TAG} AS kiwiirc
COPY --from=builder /kiwiirc/dist /usr/share/nginx/html COPY --from=builder /kiwiirc/dist /usr/share/nginx/html
#COPY static/config.json /usr/share/nginx/html/static/config.json #COPY static/config.json /usr/share/nginx/html/static/config.json

@ -1,14 +1,37 @@
FROM golang:alpine AS builder # If you are wondering why the default args are set in the Dockerfile and in the
# docker-compose.yml see this: https://github.com/docker/compose/issues/3608
ARG BLD_IMG=${BLD_IMG:-golang}
ARG BLD_TAG=${BLD_TAG:-alpine}
ARG BLD_REPO=${BLD_REPO:-https://github.com/kiwiirc/webircgateway.git}
ARG BLD_VER=${BLD_VER:-master}
ARG FNL_IMG=${FNL_IMG:-golang}
ARG FNL_TAG=${FNL_TAG:-alpine}
RUN apk --update add git g++ && \ FROM ${BLD_IMG}:${BLD_TAG} AS builder
git clone --depth=1 --single-branch https://github.com/kiwiirc/webircgateway.git && \
cd webircgateway && \
go build
FROM golang:alpine AS webircgateway ARG BLD_REPO
ARG BLD_VER
RUN apk --update add \
git \
g++
RUN git clone \
--depth 1 \
--single-branch \
--branch ${BLD_VER} \
${BLD_REPO} \
/webircgateway
WORKDIR /webircgateway
RUN go build
FROM ${FNL_IMG}:${FNL_TAG} AS webircgateway
COPY --from=builder /go/webircgateway/webircgateway /app/webircgateway COPY --from=builder /go/webircgateway/webircgateway /app/webircgateway
WORKDIR /app WORKDIR /app
CMD ["./webircgateway", "--config=config.conf"] ENTRYPOINT ["./webircgateway", "--config=config.conf"]

@ -2,6 +2,6 @@
umask 022 umask 022
exec \ exec s6-setuidgid abc proxychains /usr/bin/znc \
s6-setuidgid abc proxychains /usr/bin/znc -d /config \ -d /config \
--foreground --foreground

Loading…
Cancel
Save