ci: Docker frontend startup, move packages to devcontainer, and config to postiz.env
This commit is contained in:
parent
b735a7ce8e
commit
1498f04ba6
|
|
@ -15,14 +15,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
|
|||
|
||||
RUN apk add --no-cache \
|
||||
bash=5.2.21-r0 \
|
||||
supervisor=4.2.5-r4 \
|
||||
pkgconfig \
|
||||
gcc \
|
||||
pixman-dev \
|
||||
cairo-dev \
|
||||
pango-dev \
|
||||
make \
|
||||
build-base
|
||||
supervisor=4.2.5-r4
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -32,7 +25,7 @@ EXPOSE 3000
|
|||
COPY var/docker/entrypoint.sh /app/entrypoint.sh
|
||||
COPY var/docker/supervisord.conf /etc/supervisord.conf
|
||||
COPY var/docker/supervisord /app/supervisord_available_configs/
|
||||
COPY .env.example /config/.env
|
||||
COPY .env.example /config/postiz.env
|
||||
|
||||
VOLUME /config
|
||||
|
||||
|
|
@ -43,12 +36,23 @@ ENTRYPOINT ["/app/entrypoint.sh"]
|
|||
# Builder image
|
||||
FROM base AS devcontainer
|
||||
|
||||
RUN apk add --no-cache \
|
||||
pkgconfig \
|
||||
gcc \
|
||||
pixman-dev \
|
||||
cairo-dev \
|
||||
pango-dev \
|
||||
make \
|
||||
build-base
|
||||
|
||||
COPY nx.json tsconfig.base.json package.json package-lock.json /app/
|
||||
COPY apps /app/apps/
|
||||
COPY libraries /app/libraries/
|
||||
|
||||
RUN npm ci --no-fund && npx nx run-many --target=build --projects=frontend,backend,workers,cron
|
||||
|
||||
VOLUME /config
|
||||
|
||||
LABEL org.opencontainers.image.title="Postiz App (DevContainer)"
|
||||
|
||||
# Output image
|
||||
|
|
@ -59,5 +63,7 @@ COPY --from=devcontainer /app/dist/ /app/dist/
|
|||
|
||||
COPY package.json nx.json /app/
|
||||
|
||||
VOLUME /config
|
||||
|
||||
## Labels at the bottom, because CI will eventually add dates, commit hashes, etc.
|
||||
LABEL org.opencontainers.image.title="Postiz App (Production)"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if [[ "$SKIP_CONFIG_CHECK" != "true" ]]; then
|
|||
echo "ERROR: No .env file found in /config/.env"
|
||||
fi
|
||||
|
||||
ln -sf /config/.env /app/.env
|
||||
ln -sf /config/postiz.env /app/.env
|
||||
fi
|
||||
|
||||
if [[ "$POSTIZ_APPS" -eq "" ]]; then
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[program:frontend]
|
||||
directory=/app
|
||||
command=npm run start:prod:frontend
|
||||
directory=/app/dist/apps/frontend
|
||||
command=npx next start
|
||||
autostart=true
|
||||
autorestart=false
|
||||
redirect_stderr=true
|
||||
|
|
|
|||
Loading…
Reference in New Issue