-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
31 lines (28 loc) · 1 KB
/
docker-compose.yml
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
26
27
28
29
30
31
version: "3.12"
services:
web:
build:
context: .
dockerfile: Dockerfile # Specify the Dockerfile location
ports:
- "5000:5000" # Map host port 5000 to container port 5000
volumes:
- ./app:/app # Mount local app directory to /app in the container
environment:
FLASK_ENV: development # Set Flask environment to development for auto-reload
FLASK_APP: app.py # Set the main entry point of the Flask application
restart: unless-stopped # Automatically restart the container unless stopped
# Add a database service if needed (for example, PostgreSQL)
db:
image: postgres:latest
environment:
POSTGRES_USER: user # Replace with your own values
POSTGRES_PASSWORD: password
POSTGRES_DB: paperdb
volumes:
- ./db_data:/var/lib/postgresql/data # Persist data
restart: unless-stopped
# Network setup (optional, depends on the app’s need for multiple services)
networks:
default:
driver: bridge