Skip to content
Snippets Groups Projects
Commit 42a9aa10 authored by Andrea Callia D'Iddio's avatar Andrea Callia D'Iddio
Browse files

Set up db and docker configuration.

parent 33ba29ed
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ class BaseConfig:
class DevConfig(BaseConfig):
SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db"
SQLALCHEMY_DATABASE_URI = os.environ.get("DB_OVERRIDE", "sqlite:///dev.db")
DEBUG = True
......
FROM python:3.10
# Install required system dependencies
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential libldap2-dev libsasl2-dev ldap-utils libpq-dev
COPY requirements.txt /emarking/
COPY .flaskenv /emarking/
WORKDIR project-allocator
# Install python packages
RUN pip install --upgrade pip && pip install -r requirements.txt
services:
test_db:
image: postgres
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
main_db:
image: postgres
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
project-allocator:
image: project-allocator
environment:
- TEST_DATABASE_URL=postgresql://user:pass@test_db/test-db
- DB_OVERRIDE=postgresql://user:pass@main_db
build:
context: .
dockerfile: dev.Dockerfile
ports:
- 5000:5000
command: flask run -h '0.0.0.0' -p 5000
volumes:
- .:/project-allocator
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment