docker-compose.yml for the project

This commit is contained in:
2024-08-02 22:39:13 +03:00
parent a82635fea5
commit 19965ab5bd

34
docker-compose.yml Normal file
View 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