File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,16 @@ services:
4444 restart : unless-stopped
4545
4646 nginx :
47- build : ./nginx
47+ build :
48+ context : .
49+ dockerfile : ./nginx/Dockerfile.prod
4850 container_name : vim-nginx
4951 restart : unless-stopped
5052 environment :
5153 - HOST_NAME=${HOST_NAME}
5254 ports :
5355 - " 8000:80"
5456 volumes :
55- - ./web-app/frontend/assets/:/virtual-instrument-museum/frontend/assets/
5657 - vim-static:/virtual-instrument-museum/static
5758 - vim-media:/virtual-instrument-museum/media
5859 depends_on :
Original file line number Diff line number Diff line change 11FROM nginx:1.25.2
22COPY ./nginx.conf /etc/nginx/nginx.conf
3- COPY ./vim.conf.template /etc/nginx/templates/vim.conf.template
3+ COPY ./vim.conf.template /etc/nginx/templates/vim.conf.template
Original file line number Diff line number Diff line change 1+ # Production nginx: includes compiled frontend assets in the image
2+ # (Dev uses bind mounts instead, see docker-compose.yml)
3+
4+ FROM node:20-slim AS frontend-builder
5+ COPY ./web-app/frontend/ /frontend/
6+ WORKDIR /frontend
7+ RUN npm install && npm run sass:build
8+
9+ FROM nginx:1.25.2
10+ COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
11+ COPY ./nginx/vim.conf.template /etc/nginx/templates/vim.conf.template
12+ # Copy static assets (images, fonts, etc.) and compiled CSS
13+ COPY ./web-app/frontend/assets/ /virtual-instrument-museum/frontend/assets/
14+ COPY --from=frontend-builder /frontend/assets/css /virtual-instrument-museum/frontend/assets/css
You can’t perform that action at this time.
0 commit comments