Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- Add Dockerfile.ci for backend, cannaiq, findadispo, findagram - Frontend Dockerfiles just copy pre-built assets to nginx - Backend Dockerfile copies pre-built dist/node_modules - Reduces Docker build time by doing npm ci/build in CI step 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
781 B
Docker
26 lines
781 B
Docker
# CI Dockerfile - assets pre-built in CI step
|
|
FROM nginx:alpine
|
|
|
|
# Copy pre-built assets from CI (CRA builds to /build)
|
|
COPY findadispo/frontend/build /usr/share/nginx/html
|
|
|
|
# SPA routing config
|
|
RUN echo 'server { \
|
|
listen 80; \
|
|
server_name _; \
|
|
root /usr/share/nginx/html; \
|
|
index index.html; \
|
|
gzip on; \
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; \
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { \
|
|
expires 1y; \
|
|
add_header Cache-Control "public, immutable"; \
|
|
} \
|
|
location / { \
|
|
try_files $uri $uri/ /index.html; \
|
|
} \
|
|
}' > /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|