feat: network updates
This commit is contained in:
@@ -16,11 +16,8 @@ COPY --from=builder /app/.next ./.next
|
|||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
COPY --from=builder /app/next.config.ts ./next.config.ts
|
COPY --from=builder /app/next.config.ts ./next.config.ts
|
||||||
COPY entrypoint.sh /app/entrypoint.sh
|
|
||||||
RUN chmod +x /app/entrypoint.sh
|
|
||||||
RUN npm prune --omit=dev
|
RUN npm prune --omit=dev
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
||||||
CMD ["npm", "start", "--", "-p", "3000", "-H", "0.0.0.0"]
|
CMD ["npm", "start", "--", "-p", "3000", "-H", "0.0.0.0"]
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||||
CMD wget -q --spider http://localhost:3000/ || exit 1
|
CMD wget -q --spider http://localhost:3000/ || exit 1
|
||||||
@@ -2,8 +2,6 @@ services:
|
|||||||
eu:
|
eu:
|
||||||
image: 172.17.0.1:5000/eu:latest
|
image: 172.17.0.1:5000/eu:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
extra_hosts:
|
|
||||||
- "assets.dusiburg.ru:172.18.0.4"
|
|
||||||
environment:
|
environment:
|
||||||
PUBLIC_URL: ${PUBLIC_URL}
|
PUBLIC_URL: ${PUBLIC_URL}
|
||||||
DATABASE_URL: ${DATABASE_URL}
|
DATABASE_URL: ${DATABASE_URL}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
NGINX_PROXY_NAME="${NGINX_PROXY_CONTAINER_NAME:-nginx-proxy}"
|
|
||||||
|
|
||||||
TARGET_DOMAIN=$(echo "$MINIO_PUBLIC_URL" | sed -E 's#^https?://##; s#/.*##; s#:.*##')
|
|
||||||
|
|
||||||
if [ -n "$TARGET_DOMAIN" ]; then
|
|
||||||
IP=$(getent hosts "$NGINX_PROXY_NAME" | awk '{ print $1 }' | head -n1)
|
|
||||||
|
|
||||||
if [ -n "$IP" ]; then
|
|
||||||
echo "$IP $TARGET_DOMAIN" >> /etc/hosts
|
|
||||||
echo "[entrypoint] resolved $NGINX_PROXY_NAME -> $IP for $TARGET_DOMAIN"
|
|
||||||
else
|
|
||||||
echo "[entrypoint] WARNING: could not resolve $NGINX_PROXY_NAME, using public DNS as fallback"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$@"
|
|
||||||
Reference in New Issue
Block a user