Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Branch CI
on:
push:
branches-ignore:
- main
jobs:
Build-And-Test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Docker Images
run: docker compose build
13 changes: 13 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Branch CI
on:
push:
branches:
- main
jobs:
Build-And-Test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Docker Images
run: docker compose build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Ruff stuff:
.ruff_cache/
Expand Down
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.11-slim

RUN mkdir /berlin-transit
WORKDIR /berlin-transit

RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .
RUN chmod +x /berlin-transit/entrypoint.sh

ENTRYPOINT ["/berlin-transit/entrypoint.sh"]
28 changes: 28 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
services:
postgres:
image: postgres:15.6
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: S3cr3t_P4ssw0rd
POSTGRES_DB: transit
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10

app:
build: .
depends_on:
- postgres
ports:
- "5000:5000"
environment:
FLASK_APP: app
FLASK_ENV: development
DATABASE_URL: postgresql://postgres:S3cr3t_P4ssw0rd@postgres:5432/transit

volumes:
pgdata:
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -ex

exit 0
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dash==3.0.3
psycopg2-binary==2.9.10
sqlalchemy==2.0.40
alembic==1.15.2
pandas==2.2.3
requests==2.32.3
pytz==2025.2
pytest==8.3.5
pytest-mock==3.14.0