mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Update Dockerfile
This commit is contained in:
@@ -28,41 +28,12 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
FROM node:18.18-bullseye-slim
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install postgres
|
||||
RUN \
|
||||
# Recreate data
|
||||
mkdir /data_linkwarden
|
||||
|
||||
WORKDIR /data_linkwarden
|
||||
|
||||
RUN \
|
||||
# Get repo
|
||||
apt-get update && \
|
||||
apt-get install -y git && \
|
||||
git clone https://github.com/linkwarden/linkwarden.git && \
|
||||
\
|
||||
# Adapt for sqlite
|
||||
sed -i "s|postgresql|sqlite|g" linkwarden/prisma/schema.prisma && \
|
||||
\
|
||||
# Copy files
|
||||
cp linkwarden/package.json linkwarden/yarn.lock linkwarden/playwright.config.ts .
|
||||
|
||||
# Increase timeout to pass github actions arm64 build
|
||||
RUN --mount=type=cache,sharing=locked,target=/usr/local/share/.cache/yarn yarn install --network-timeout 10000000
|
||||
|
||||
RUN npx playwright install-deps && \
|
||||
apt-get clean && \
|
||||
yarn cache clean
|
||||
|
||||
RUN echo "NEXTAUTH_SECRET=homeassistant_secret" > .env && \
|
||||
echo "NEXTAUTH_URL=http://localhost:3000/api/v1/auth" >> .env && \
|
||||
echo "NEXTAUTH_SECRET=file:/config/database/linkwarden.sqlite" >> .env && \
|
||||
cp -rnf linkwarden/* .
|
||||
|
||||
RUN yarn prisma generate && \
|
||||
yarn build
|
||||
apt update && apt install vim gnupg2 lsb-release -y && \
|
||||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc| gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg && \
|
||||
sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
|
||||
apt update && apt install -y postgresql-16
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
Reference in New Issue
Block a user