Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project Allocator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edtech
Project Allocator
Commits
42a9aa10
Commit
42a9aa10
authored
2 years ago
by
Andrea Callia D'Iddio
Browse files
Options
Downloads
Patches
Plain Diff
Set up db and docker configuration.
parent
33ba29ed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/config.py
+1
-1
1 addition, 1 deletion
app/config.py
dev.Dockerfile
+14
-0
14 additions, 0 deletions
dev.Dockerfile
docker-compose.yml
+24
-0
24 additions, 0 deletions
docker-compose.yml
with
39 additions
and
1 deletion
app/config.py
+
1
−
1
View file @
42a9aa10
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
dev.Dockerfile
0 → 100644
+
14
−
0
View file @
42a9aa10
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
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
+
24
−
0
View file @
42a9aa10
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment