Add development + debugging docker configs

This commit is contained in:
sid palas
2023-02-01 16:15:05 -05:00
parent 15a831b04b
commit bb256c8926
21 changed files with 3752 additions and 26 deletions

View File

@ -38,7 +38,7 @@ docker-run-all:
# Stop and remove all running containers to avoid name conflicts
$(MAKE) docker-stop
$(MAKE) docker-remove
$(MAKE) docker-rm
docker run -d \
--name db \
@ -81,6 +81,7 @@ docker-run-all:
--link=api-golang \
client-react-ngnix
.PHONY: docker-stop
docker-stop:
-docker stop db
-docker stop api-node
@ -88,7 +89,8 @@ docker-stop:
-docker stop client-react-vite
-docker stop client-react-nginx
docker-remove:
.PHONY: docker-rm
docker-rm:
-docker container rm db
-docker container rm api-node
-docker container rm api-golang

View File

@ -10,14 +10,12 @@ export default defineConfig({
server: {
proxy: {
'/api/golang': {
// TODO: Make this inside and outside of docker (e.g. localhost vs api-golang)
target: 'http://api-golang:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/golang/, ''),
secure: false,
},
'/api/node': {
// TODO: Make this inside and outside of docker (e.g. localhost vs api-node)
target: 'http://api-node:3000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/node/, ''),

View File

@ -1,13 +1,4 @@
services:
client-react-vite:
build:
context: ../05-example-web-application/client-react/
dockerfile: ../../06-building-container-images/client-react/Dockerfile.3
ports:
- 5173:5173
volumes:
- ${PWD}/client-react/vite.config.js:/usr/src/app/vite.config.js
restart: unless-stopped
client-react-nginx:
build:
context: ../05-example-web-application/client-react/