This commit is contained in:
2026-01-26 19:48:39 +01:00
parent 9811d7a809
commit 0f9a0d6568
2 changed files with 10 additions and 4 deletions
+3 -4
View File
@@ -34,10 +34,9 @@ COPY --from=builder /build/seo-optimizer .
COPY --from=builder /build/configs ./configs COPY --from=builder /build/configs ./configs
# Create non-root user # Create non-root user
RUN useradd -m -u 1000 appuser && \ RUN useradd -m -u 1000 appuser
chown -R appuser:appuser /app
USER appuser COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
# Expose API port # Expose API port
EXPOSE 8080 EXPOSE 8080
@@ -47,4 +46,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:8080/api/v1/health || exit 1 CMD wget --quiet --tries=1 --spider http://localhost:8080/api/v1/health || exit 1
# Run application # Run application
ENTRYPOINT ["./seo-optimizer"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
mkdir -p /app/data
chown -R appuser:appuser /app/data
exec su -s /bin/sh appuser -c "/app/seo-optimizer"