Provide nginx docker build recipe

This commit is contained in:
Hyunggyu Jang 2023-03-22 22:59:29 +09:00
parent 36f3d37ecc
commit 40ed6fa9ec
3 changed files with 37 additions and 1 deletions

View file

@ -25,3 +25,11 @@ EXPOSE 3080
ENV HOST=0.0.0.0
# Run the app when the container launches
CMD ["npm", "start"]
# Optional: for client with nginx routing
FROM nginx:stable-alpine AS nginx-client
WORKDIR /usr/share/nginx/html
COPY --from=react-client /client/public /usr/share/nginx/html
# Add your nginx.conf
COPY /client/nginx.conf /etc/nginx/conf.d/default.conf
ENTRYPOINT ["nginx", "-g", "daemon off;"]