| # debian.sh --arch 'amd64' out/ 'bullseye' '@1751241600' |
| LABEL stage=final-image |
| WORKDIR /app |
| RUN /bin/sh -c apt-get update && apt-get install -y nginx ca-certificates curl && rm -rf /var/lib/apt/lists/* # buildkit |
| COPY nginx.conf /etc/nginx/nginx.conf # buildkit |
| RUN /bin/sh -c rm -f /etc/nginx/sites-enabled/default # buildkit |
| COPY /app-vue/dist /var/www/html/ # buildkit |
| COPY /app-go/v2fmdash-server . # buildkit |
| COPY /app-go/public ./public/ # buildkit |
| COPY /app-go/utils ./utils/ # buildkit |
| RUN /bin/sh -c groupadd -r appgroup && useradd -r -g appgroup -d /app -s /sbin/nologin -c "Application User" appuser # buildkit |
| RUN /bin/sh -c chown -R appuser:appgroup /app/public # buildkit |
| RUN /bin/sh -c chown appuser:appgroup /app/v2fmdash-server # buildkit |
| RUN /bin/sh -c chown -R www-data:www-data /var/www/html # buildkit |
| RUN /bin/sh -c chown -R www-data:www-data /var/log/nginx # buildkit |
| RUN /bin/sh -c chown -R www-data:www-data /var/lib/nginx # buildkit |
| RUN /bin/sh -c touch /run/nginx.pid && chown www-data:www-data /run/nginx.pid # buildkit |
| COPY entrypoint.sh /usr/local/bin/entrypoint.sh # buildkit |
| RUN /bin/sh -c chmod +x /usr/local/bin/entrypoint.sh # buildkit |
| EXPOSE map[8080/tcp:{}] |
| ENV PORT_GO_API=8091 |
| ENV PORT_NGINX=8080 |
| CMD ["/usr/local/bin/entrypoint.sh"] |