Enable BuildKit in Drone API pipeline
This commit is contained in:
parent
aea4b3c008
commit
a36c0dfdf7
2 changed files with 11 additions and 3 deletions
|
|
@ -40,13 +40,19 @@ WORKDIR /app
|
|||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN chown -R nginx:nginx /usr/share/nginx/html
|
||||
# Configure nginx to run as non-root
|
||||
RUN chown -R nginx:nginx /usr/share/nginx/html && \
|
||||
chown -R nginx:nginx /var/cache/nginx && \
|
||||
chown -R nginx:nginx /var/log/nginx && \
|
||||
touch /run/nginx.pid && chown nginx:nginx /run/nginx.pid && \
|
||||
sed -i 's/listen 80;/listen 8080;/' /etc/nginx/conf.d/default.conf && \
|
||||
sed -i 's/^user /#user /' /etc/nginx/nginx.conf
|
||||
|
||||
USER nginx
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue