+1
This commit is contained in:
+3
-4
@@ -34,10 +34,9 @@ COPY --from=builder /build/seo-optimizer .
|
||||
COPY --from=builder /build/configs ./configs
|
||||
|
||||
# Create non-root user
|
||||
RUN useradd -m -u 1000 appuser && \
|
||||
chown -R appuser:appuser /app
|
||||
RUN useradd -m -u 1000 appuser
|
||||
|
||||
USER appuser
|
||||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Expose API port
|
||||
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
|
||||
|
||||
# Run application
|
||||
ENTRYPOINT ["./seo-optimizer"]
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
Executable
+7
@@ -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"
|
||||
Reference in New Issue
Block a user