Skip to content

Commit 2cd481f

Browse files
committed
Work
1 parent ef4a7e4 commit 2cd481f

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

.devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"dockerComposeFile": "docker-compose.dev.yml",
44
"service": "app",
55
"workspaceFolder": "/oc4ids_datastore_pipeline",
6+
"forwardPorts": [5432],
67
"customizations": {
78
"vscode": {
89
"extensions":["ms-python.python"]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ RUN pip install -r requirements.txt
1111

1212
COPY . .
1313

14-
RUN pip install .
14+
RUN pip install -e .
1515

1616
ENTRYPOINT ["sh", "-c", "alembic upgrade head && oc4ids-datastore-pipeline"]

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ COPY . .
1313

1414
RUN pip install .
1515

16-
ENTRYPOINT ["sleep", "infinity"]
16+
CMD ["sleep", "infinity"]

docker-compose.dev.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,13 @@ services:
33
build:
44
context: .
55
dockerfile: Dockerfile.dev
6-
76
volumes:
87
- .:/oc4ids_datastore_pipeline:cached
9-
10-
# Overrides default command so things don't shut down after the process ends.
11-
#command: sleep infinity
12-
138
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
149
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.)
1810
environment:
1911
- DATABASE_URL=postgresql://postgres:postgres@localhost/postgres
2012

21-
entrypoint: sleep infinity
22-
2313
db:
2414
image: postgres:latest
2515
restart: unless-stopped
@@ -29,11 +19,9 @@ services:
2919
POSTGRES_USER: postgres
3020
POSTGRES_DB: postgres
3121
POSTGRES_PASSWORD: postgres
22+
# Forwarding this port so people can access the DB when run via Docker Compose.
3223
ports:
3324
- 54321:5432
3425

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-
3826
volumes:
3927
postgres-data:

0 commit comments

Comments
 (0)