From 03bf4bb755a396afad3b30489286c20a47832fbd Mon Sep 17 00:00:00 2001 From: hgw Date: Thu, 5 Oct 2023 08:52:01 +0000 Subject: [PATCH] The original docker implementation is idiotic, this is not --- .dockerignore | 1 + .gitignore | 1 + Dockerfile | 14 ++++++++++++++ docker-compose.yml | 7 +++++++ 4 files changed, 23 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..2ec5195d --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +config/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2f36fb37..4afc3caf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ package-lock.json coverage/ public/ dist/ +config/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..b83e50bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM node:lts-alpine +RUN apk add --no-cache --virtual=build-dependencies build-base git python3-dev +RUN apk add --no-cache yarn +USER node +WORKDIR /var/opt/thelounge-src +ENV THELOUNGE_HOME /var/opt/thelounge +RUN git clone https://git.supernets.org/supernets/thelounge.git . +RUN yarn install +RUN NODE_ENV=production yarn build +RUN yarn link +RUN yarn --non-interactive cache clean +RUN ln -s /var/opt/thelounge-src/index.js /var/opt/thelounge-src/thelounge +EXPOSE 9000 +CMD ["/var/opt/thelounge-src/thelounge", "start"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..07c578cd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + thelounge: + image: git.supernets.org/supernets/thelounge:4.4.1.1 + ports: + - "9000:9000" + volumes: + - "$PWD/config:/var/opt/thelounge"