Update docker

This commit is contained in:
Jake Runyan 2025-01-10 23:22:32 -08:00
parent d913ce74eb
commit 89cfa1d57b
2 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:14 AS build
WORKDIR /app
@ -10,8 +10,10 @@ COPY . .
RUN npm run build
RUN npm install -g serve
FROM nginx:alpine
EXPOSE 3000
COPY --from=build /app/build /usr/share/nginx/html
CMD ["serve", "-s", "build", "-l", "3000"]
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -5,14 +5,11 @@ networks:
services:
react-app:
container_name: jakeswestcoast
build: .
build:
context: .
dockerfile: Dockerfile
networks:
- traefik
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=production
labels:
- traefik.http.routers.jwc.rule=Host(`jakeswestcoast.com`) || Host(`www.jakeswestcoast.com`)
- traefik.http.routers.jwc.tls=true