mirror of
https://github.com/wireadmin/wireadmin
synced 2025-04-24 16:15:17 +00:00
chore
This commit is contained in:
parent
88ecd01e1f
commit
399fb0659d
20
Dockerfile
20
Dockerfile
@ -1,12 +1,15 @@
|
|||||||
FROM node:alpine as base
|
ARG ALPINE_VERSION=3.19
|
||||||
|
|
||||||
|
FROM --platform=$BUILDPLATFORM chriswayg/tor-alpine:latest as tor
|
||||||
|
FROM --platform=$BUILDPLATFORM node:alpine${ALPINE_VERSION} as base
|
||||||
LABEL Maintainer="Shahrad Elahi <https://github.com/shahradelahi>"
|
LABEL Maintainer="Shahrad Elahi <https://github.com/shahradelahi>"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV TZ=UTC
|
ENV TZ=UTC
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
COPY --from=chriswayg/tor-alpine:latest --platform=$BUILDPLATFORM /usr/local/bin/obfs4proxy /usr/local/bin/obfs4proxy
|
COPY --from=tor /usr/local/bin/obfs4proxy /usr/local/bin/obfs4proxy
|
||||||
COPY --from=chriswayg/tor-alpine:latest --platform=$BUILDPLATFORM /usr/local/bin/meek-server /usr/local/bin/meek-server
|
COPY --from=tor /usr/local/bin/meek-server /usr/local/bin/meek-server
|
||||||
|
|
||||||
# Update and upgrade packages
|
# Update and upgrade packages
|
||||||
RUN apk update && apk upgrade &&\
|
RUN apk update && apk upgrade &&\
|
||||||
@ -30,7 +33,6 @@ RUN chmod -R +x /usr/local/bin
|
|||||||
COPY web/package.json web/pnpm-lock.yaml ./
|
COPY web/package.json web/pnpm-lock.yaml ./
|
||||||
|
|
||||||
# Base env
|
# Base env
|
||||||
ENV ORIGIN=http://127.0.0.1:3000
|
|
||||||
ENV PROTOCOL_HEADER=x-forwarded-proto
|
ENV PROTOCOL_HEADER=x-forwarded-proto
|
||||||
ENV HOST_HEADER=x-forwarded-host
|
ENV HOST_HEADER=x-forwarded-host
|
||||||
|
|
||||||
@ -62,6 +64,11 @@ FROM base AS release
|
|||||||
COPY --from=build /tmp/node_modules node_modules
|
COPY --from=build /tmp/node_modules node_modules
|
||||||
COPY --from=build /tmp/build build
|
COPY --from=build /tmp/build build
|
||||||
|
|
||||||
|
# Fix permissions
|
||||||
|
RUN mkdir -p /data && chmod 700 /data
|
||||||
|
RUN mkdir -p /etc/torrc.d && chmod -R 400 /etc/torrc.d
|
||||||
|
RUN mkdir -p /var/vlogs && touch /var/vlogs/web && chmod -R 600 /var/vlogs
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV LOG_LEVEL=error
|
ENV LOG_LEVEL=error
|
||||||
|
|
||||||
@ -74,11 +81,6 @@ ENTRYPOINT ["/entrypoint.sh"]
|
|||||||
HEALTHCHECK --interval=60s --timeout=3s --start-period=20s --retries=3 \
|
HEALTHCHECK --interval=60s --timeout=3s --start-period=20s --retries=3 \
|
||||||
CMD curl -f http://127.0.0.1:3000/api/health || exit 1
|
CMD curl -f http://127.0.0.1:3000/api/health || exit 1
|
||||||
|
|
||||||
# Fix permissions
|
|
||||||
RUN mkdir -p /data && chmod 700 /data
|
|
||||||
RUN mkdir -p /etc/torrc.d && chmod -R 400 /etc/torrc.d
|
|
||||||
RUN mkdir -p /var/vlogs && touch /var/vlogs/web && chmod -R 600 /var/vlogs
|
|
||||||
|
|
||||||
# Volumes
|
# Volumes
|
||||||
VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"]
|
VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"]
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
FROM node:alpine as base
|
ARG ALPINE_VERSION=3.19
|
||||||
|
|
||||||
|
FROM --platform=$BUILDPLATFORM chriswayg/tor-alpine:latest as tor
|
||||||
|
FROM --platform=$BUILDPLATFORM node:alpine${ALPINE_VERSION} as base
|
||||||
LABEL Maintainer="Shahrad Elahi <https://github.com/shahradelahi>"
|
LABEL Maintainer="Shahrad Elahi <https://github.com/shahradelahi>"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV TZ=UTC
|
ENV TZ=UTC
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
COPY --from=chriswayg/tor-alpine:latest /usr/local/bin/obfs4proxy /usr/local/bin/obfs4proxy
|
COPY --from=tor /usr/local/bin/obfs4proxy /usr/local/bin/obfs4proxy
|
||||||
COPY --from=chriswayg/tor-alpine:latest /usr/local/bin/meek-server /usr/local/bin/meek-server
|
COPY --from=tor /usr/local/bin/meek-server /usr/local/bin/meek-server
|
||||||
|
|
||||||
# Update and upgrade packages
|
# Update and upgrade packages
|
||||||
RUN apk update && apk upgrade &&\
|
RUN apk update && apk upgrade &&\
|
||||||
@ -35,27 +38,26 @@ ENV PATH="$PNPM_HOME:$PATH"
|
|||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|
||||||
# Base env
|
# Base env
|
||||||
ENV ORIGIN=http://127.0.0.1:5173,http://localhost:5173
|
|
||||||
ENV PROTOCOL_HEADER=x-forwarded-proto
|
ENV PROTOCOL_HEADER=x-forwarded-proto
|
||||||
ENV HOST_HEADER=x-forwarded-host
|
ENV HOST_HEADER=x-forwarded-host
|
||||||
|
|
||||||
|
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
|
|
||||||
|
ENV VERSION=0.0.0-dev
|
||||||
ENV NODE_ENV=development
|
ENV NODE_ENV=development
|
||||||
ENV LOG_LEVEL=debug
|
ENV LOG_LEVEL=debug
|
||||||
|
|
||||||
ENV VERSION=0.0.0-dev
|
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /entrypoint.sh
|
|
||||||
RUN chmod +x /entrypoint.sh
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
|
|
||||||
# Fix permissions
|
# Fix permissions
|
||||||
RUN mkdir -p /data && chmod 700 /data
|
RUN mkdir -p /data && chmod 700 /data
|
||||||
RUN mkdir -p /etc/torrc.d && chmod -R 400 /etc/torrc.d
|
RUN mkdir -p /etc/torrc.d && chmod -R 400 /etc/torrc.d
|
||||||
RUN mkdir -p /var/vlogs && touch /var/vlogs/web && chmod -R 600 /var/vlogs
|
RUN mkdir -p /var/vlogs && touch /var/vlogs/web && chmod -R 600 /var/vlogs
|
||||||
|
|
||||||
|
# Setup entrypoint
|
||||||
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
# Volumes
|
# Volumes
|
||||||
VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"]
|
VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"]
|
||||||
|
|
||||||
|
@ -96,7 +96,6 @@
|
|||||||
<span class="mb-0.5"> {data.server.name} </span>
|
<span class="mb-0.5"> {data.server.name} </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="space-y-3.5">
|
<div class="space-y-3.5">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
|
Loading…
Reference in New Issue
Block a user