-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
28 lines (25 loc) · 1.17 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
version: '3' # Docker Compose file version
services:
web:
build: ./flask_app # Path to the directory containing the Dockerfile for the Flask app
ports:
- "8080:8080" # Maps port 8080 of the host to port 8080 of the container
depends_on:
- db # Ensures the db service is started before the web service
scrapy:
build: ./scrapy_project # Path to the directory containing the Dockerfile for the Scrapy project
depends_on:
- db # Ensures the db service is started before the scrapy service
db:
image: postgres:latest # Use the latest PostgreSQL image
environment:
POSTGRES_USER: luxonis # Username for PostgreSQL
POSTGRES_PASSWORD: admin # Password for PostgreSQL
POSTGRES_DB: flats_db # Database name to be created
volumes:
- ./db_init_scripts:/docker-entrypoint-initdb.d # Mounts initialization scripts into the container
- postgres_data:/var/lib/postgresql/data # Persistent volume for PostgreSQL data
ports:
- "5432:5432" # Maps port 5432 of the host to port 5432 of the container (PostgreSQL default port)
volumes:
postgres_data: # Declares a named volume for persisting database data