dockerize app
This commit is contained in:
parent
af99a9b4c2
commit
091a21c8e6
9 changed files with 78 additions and 10 deletions
38
docker-compose.yaml
Normal file
38
docker-compose.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
services:
|
||||
db:
|
||||
container_name: recipes_postgres
|
||||
image: docker.io/library/postgres:17
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- POSTGRES_USER=${DB_USER}
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
- POSTGRES_DB=${DB_NAME}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./postgres/db:/var/lib/postgresql/data
|
||||
backend:
|
||||
image: recipes_backend
|
||||
container_name: recipes_backend
|
||||
build: ./backend
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./backend:/usr/src/app
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- DB_USER=${DB_USER}
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
- DB_NAME=${DB_NAME}
|
||||
frontend:
|
||||
image: recipes_frontend
|
||||
container_name: recipes_frontend
|
||||
build: ./frontend
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./frontend:/usr/src/app
|
||||
environment:
|
||||
- NODE_ENV=development
|
Loading…
Add table
Add a link
Reference in a new issue