docker-compose.yml for the project
This commit is contained in:
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: ./frontend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
|
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: ./backend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=postgresql://user:password@database:5432/db # Adjust as needed
|
||||||
|
networks:
|
||||||
|
- internal_network
|
||||||
|
links:
|
||||||
|
- db:database
|
||||||
|
db:
|
||||||
|
image: postgres:latest
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: user # Change to your desired username
|
||||||
|
POSTGRES_PASSWORD: password # Change to your desired password
|
||||||
|
POSTGRES_DB: db # Change to your desired database name
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
networks:
|
||||||
|
internal_network:
|
||||||
|
driver: bridge
|
||||||
Reference in New Issue
Block a user