Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Dockerfile with PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/usr/src/app",
"workspaceMount": "source=${localWorkspaceFolder},target=/usr/src/app,type=bind",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile",
"runArgs": [
"--env-file",
"../deployment/local/env"
]
}
//,"settings": {
// // Put any VSCode settings here, such as extensions to install, etc.
//},
//"extensions": [
// // List extensions here
//]
}
35 changes: 35 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: '3.8'
services:
app:
build:
context: ..
dockerfile: ../Dockerfile
env_file:
- ../deployment/local/env # Loads your environment variables
environment:
#- DATABASE_URL=postgresql://${POSTGRES_USERNAME_HD}:${POSTGRES_PASSWORD_HD}@${POSTGRES_HOST_HD}:${POSTGRES_PORT_HD}/${POSTGRES_DATABASE_HD}
- DATABASE_URL=postgresql://postgres:postgres@db:5432/tierstatistik
volumes:
- ../src:/workspace # Maps the parent directory to /workspace in the container

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db

db:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
# POSTGRES_DB: POSTGRES_DATABASE_HD
# POSTGRES_USER: POSTGRES_USERNAME_HD
# POSTGRES_PASSWORD: POSTGRES_PASSWORD_HD
volumes:
- postgres-data:/var/lib/postgresql/data

volumes:
postgres-data:
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM python:3.11-slim

# install vim for development
RUN apt-get update && apt-get install -y vim
# Create the workspace directory for devcontainers
RUN mkdir -p /workspace

RUN mkdir -p /opt/airflow/airflow_home/dags/

Expand Down
4 changes: 3 additions & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ rdfpandas
rdflib
pandas
psycopg2-binary
dbt-postgres
dbt-core
#apparently 1.8 Error: pg_config executable not found.
dbt-postgres!=1.8.0,!=1.8.1