-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
25 lines (24 loc) · 921 Bytes
/
docker-compose.yml
File metadata and controls
25 lines (24 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
services:
dotnet_app:
build:
context: . # Build from the current directory
dockerfile: Dockerfile # Use the specified Dockerfile
container_name: eatsomewhere # Optional: name the container
depends_on:
- postgres
ports:
- "8384:8384" # Map container port 80 to host port 5000 (adjust as needed)
volumes:
- ./dotnet_data:/app/data # Mount a volume to /app/data inside the container
postgres:
image: postgres:latest # Use the latest PostgreSQL image
container_name: postgres_db # Optional: name the container
environment:
POSTGRES_USER: eatsomewhere # Set the PostgreSQL user
POSTGRES_PASSWORD: eatsomewhere # Set the PostgreSQL password
POSTGRES_DB: eatsomewhere # Set the PostgreSQL database name
volumes:
- ./postgres_data:/var/lib/postgresql/data # Persist PostgreSQL data
volumes:
dotnet_data:
driver: local