Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (71 loc) · 2.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (71 loc) · 2.13 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
services:
db:
image: postgres:18.4-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
backend:
build: ./backend
environment:
DB_HOST: db
DB_NAME: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_SCHEMA: app
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
frontend:
build: ./frontend
environment:
BACKEND_API_URL: http://backend:8080
ports:
- "3000:3000"
depends_on:
- backend
# The two data jobs. Neither is started by `docker compose up`: they run and
# exit, it is not a service. A container job you add later shares this
# image and differs only in the command, which is how Container Apps jobs are
# configured in Azure.
#
# docker compose build pipeline build the image the job uses
# docker compose run --rm pipeline the ingestion job
#
# Neither can authenticate to Azure from your laptop: a container has no
# `az login` and no metadata service. Build here, run in Azure, and use
# `uv run python -m src.ingestion.pipeline` when you want to run something locally.
pipeline:
build: ./data
image: final-project-pipeline
profiles: [data]
# Optional, like the Airflow override's. Older Compose versions read every
# service's env_file while loading the project, even for an inactive
# profile, which made `docker compose up -d db` fail on a clean clone
# before anyone had written data/.env.
env_file:
- path: ./data/.env
required: false
environment:
# Reach the database by its service name on the compose network.
BACKEND_PG_HOST: db
BACKEND_PG_PORT: "5432"
depends_on:
db:
condition: service_healthy
volumes:
db-data:
networks:
default:
name: finalproject