File tree Expand file tree Collapse file tree 3 files changed +66
-0
lines changed Expand file tree Collapse file tree 3 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "name" : " OC4IDS Datastore Pipeline Dev Container" ,
3+ "dockerComposeFile" : " docker-compose.dev.yml" ,
4+ "service" : " app" ,
5+ "workspaceFolder" : " /oc4ids_datastore_pipeline" ,
6+ "customizations" : {
7+ "vscode" : {
8+ "extensions" :[" ms-python.python" ]
9+ }
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ FROM python:3.12-bookworm
2+
3+ RUN apt-get update \
4+ && apt-get install -y libpq-dev gcc
5+
6+ WORKDIR /oc4ids_datastore_pipeline
7+
8+ COPY requirements_dev.txt .
9+
10+ RUN pip install -r requirements_dev.txt
11+
12+ COPY . .
13+
14+ RUN pip install .
15+
16+ ENTRYPOINT ["sleep", "infinity"]
Original file line number Diff line number Diff line change 1+ services :
2+ app :
3+ build :
4+ context : .
5+ dockerfile : Dockerfile.dev
6+
7+ volumes :
8+ - .:/oc4ids_datastore_pipeline:cached
9+
10+ # Overrides default command so things don't shut down after the process ends.
11+ # command: sleep infinity
12+
13+ # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
14+ network_mode : service:db
15+
16+ # Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
17+ # (Adding the "ports" property to this file will not forward from a Codespace.)
18+ environment :
19+ - DATABASE_URL=postgresql://postgres:postgres@localhost/postgres
20+
21+ entrypoint : sleep infinity
22+
23+ db :
24+ image : postgres:latest
25+ restart : unless-stopped
26+ volumes :
27+ - postgres-data:/var/lib/postgresql/data
28+ environment :
29+ POSTGRES_USER : postgres
30+ POSTGRES_DB : postgres
31+ POSTGRES_PASSWORD : postgres
32+ ports :
33+ - 54321:5432
34+
35+ # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
36+ # (Adding the "ports" property to this file will not forward from a Codespace.)
37+
38+ volumes :
39+ postgres-data :
You can’t perform that action at this time.
0 commit comments