update dev dockerfiles

This commit is contained in:
sid palas
2023-02-21 20:35:58 -05:00
parent d2a8e3a599
commit e796267218
6 changed files with 59 additions and 36 deletions

View File

@ -1,12 +1,11 @@
version: "3.9"
services:
client-react-vite:
image: client-react-vite
build:
context: ../05-example-web-application/client-react/
dockerfile: ../../06-building-container-images/client-react/Dockerfile.3
networks:
- frontend
ports:
- 5173:5173
init: true
volumes:
- type: bind
source: ../05-example-web-application/client-react/
@ -16,39 +15,55 @@ services:
- type: bind
source: ../08-running-containers/client-react/vite.config.js
target: /usr/src/app/vite.config.js
networks:
- frontend
ports:
- 5173:5173
client-react-nginx:
image: client-react-nginx
build:
context: ../05-example-web-application/client-react/
dockerfile: ../../06-building-container-images/client-react/Dockerfile.5
init: true
networks:
- frontend
ports:
- 80:8080
restart: unless-stopped
api-node:
image: api-node
build:
context: ../05-example-web-application/api-node/
dockerfile: ../../06-building-container-images/api-node/Dockerfile.9
target: dev
init: true
volumes:
- type: bind
source: ../05-example-web-application/api-node/
target: /usr/src/app/
- type: volume
target: /usr/src/app/node_modules
init: true
depends_on:
- db
environment:
- DATABASE_URL=postgres://postgres:foobarbaz@db:5432/postgres
networks:
- frontend
- backend
- backend
ports:
- "3000:3000"
- 3000:3000
restart: unless-stopped
api-golang:
image: api-golang
build:
context: ../05-example-web-application/api-golang/
dockerfile: ../../06-building-container-images/api-golang/Dockerfile.8
target: dev
init: true
volumes:
- type: bind
source: ../05-example-web-application/api-golang/
target: /app/
init: true
depends_on:
- db
environment:
@ -57,7 +72,7 @@ services:
- frontend
- backend
ports:
- "8080:8080"
- 8080:8080
restart: unless-stopped
db:
image: postgres:15.1-alpine