Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
94170d1ce1
|
|
@ -14,17 +14,20 @@ ENV NPM_CONFIG_UPDATE_NOTIFIER=false
|
|||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
RUN apk add --no-cache \
|
||||
caddy \
|
||||
bash=5.2.21-r0 \
|
||||
supervisor=4.2.5-r4
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 4200
|
||||
EXPOSE 3000
|
||||
EXPOSE 4200
|
||||
EXPOSE 5000
|
||||
|
||||
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 var/docker/Caddyfile /app/Caddyfile
|
||||
COPY .env.example /config/postiz.env
|
||||
|
||||
VOLUME /config
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
:5000/ {
|
||||
handle_path /api/* {
|
||||
reverse_proxy * localhost:3000
|
||||
}
|
||||
|
||||
handle {
|
||||
reverse_proxy * localhost:4200
|
||||
}
|
||||
}
|
||||
|
|
@ -5,8 +5,8 @@ set -o xtrace
|
|||
if [[ "$SKIP_CONFIG_CHECK" != "true" ]]; then
|
||||
echo "Entrypoint: Copying /config/postiz.env into /app/.env"
|
||||
|
||||
if [ ! -f /config/.env ]; then
|
||||
echo "Entrypoint: WARNING: No .env file found in /config/postiz.env"
|
||||
if [ ! -f /config/postiz.env ]; then
|
||||
echo "Entrypoint: WARNING: No postiz.env file found in /config/postiz.env"
|
||||
fi
|
||||
|
||||
cp -vf /config/postiz.env /app/.env
|
||||
|
|
@ -22,6 +22,11 @@ npm run prisma-db-push
|
|||
|
||||
mkdir -p /etc/supervisor.d/
|
||||
|
||||
if [[ "$INTERNAL_PROXY_ENABLED" != "false" ]]; then
|
||||
echo "Entrypoint: Starting internal proxy"
|
||||
cp -vf /app/supervisord_available_configs/caddy.conf /etc/supervisor.d/
|
||||
fi
|
||||
|
||||
if [[ "$POSTIZ_APPS" == *"frontend"* ]]; then
|
||||
ln -sf /app/supervisord_available_configs/frontend.conf /etc/supervisor.d/
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
[program:backend]
|
||||
directory=/app
|
||||
command=caddy run --config /app/Caddyfile
|
||||
autostart=true
|
||||
autorestart=false
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
Loading…
Reference in New Issue