Find a file
faul-sname 4892b58d10
Add migrations using alembic.
* #39 Add Flask-Migrate dep

* #39 Make it such that flask db init can run

https://github.com/miguelgrinberg/Flask-Migrate/issues/196#issuecomment-381343393

* Run flask db init, update migrations.env, commit artifacts

* Set up a script such that you can `docker-compose exec files bash -c 'cd /service; FLASK_APP="files/cli:app" flask '` and have it do whatever flask thing you want

* Fix circular dependency

* import * is evil

* Initial alembic migration, has issues with constraints and nullable columns

* Bring alts table up to date with alembic autogenerate

* Rerun flask db revision autogenerate

* Bring award_relationships table up to date with alembic autogenerate

* [#39/alembic] files/classes/__init__.py is evil but is at least explicitly evil now

* #39 fix model in files/classes/badges.py

* #39 fix model in files/classes/domains.py and files/classes/clients.py

* #39 fix models: comment saves, comment flags

* #39 fix models: comments

* Few more imports

* #39 columns that are not nullable should be flagged as not nullable

* #39 Add missing indexes to model defs

* [#39] add missing unique constraints to model defs

* [#39] Temporarily undo any model changes which cause the sqlalchemy model to be out of sync with the actual dump

* #39 Deforeignkeyify the correct column to make alembic happy

* #39 flask db revision --autogenerate now creates an empty migration

* #39 Migration format such that files are listed in creation order

* #39 Better first revision

* #39 Revert the model changes that were required to get to zero differences between db revision --autogenerate and the existing schema

* #39 The first real migration

* #39 Ensure that foreign key constraints are named in migration

* #39 Alembic migrations for FK constraints, column defs

* [#39] Run DB migrations before starting tests

* [#39] New test to ensure migrations are up to date

* [#39] More descriptive test failure message

* Add -T flag to docker-compose exec

* [#39] Run alembic migrations when starting the container
2022-05-17 18:55:17 -05:00
.github Add run_tests step. 2022-05-14 02:13:53 -05:00
files Add migrations using alembic. 2022-05-17 18:55:17 -05:00
migrations Add migrations using alembic. 2022-05-17 18:55:17 -05:00
.dockerignore Add a .dockerignore to make builds faster and smaller. 2022-05-14 02:12:55 -05:00
.editorconfig Add .editorconfig. 2022-05-08 23:14:58 -05:00
.gitattributes Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
.gitignore Fix: .gitignore ignores a critical file. 2022-05-14 02:13:08 -05:00
dependabot.yml Add trailing LF to text files 2022-05-10 21:05:51 -04:00
docker-compose.yml Initial e2e testing 2022-05-13 02:55:29 -05:00
Dockerfile Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
env Set static image for banner 2022-05-03 21:29:33 -05:00
LICENSE Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
pg_hba.conf Add trailing LF to text files 2022-05-10 21:05:51 -04:00
readme.md Add workflow badge 2022-05-15 14:21:11 -05:00
redis.conf Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
requirements.txt Add migrations using alembic. 2022-05-17 18:55:17 -05:00
run_tests.py Add migrations using alembic. 2022-05-17 18:55:17 -05:00
schema.sql Adding usernotes. 2022-05-16 11:53:24 -05:00
seed-db.sql Add trailing LF to text files 2022-05-10 21:05:51 -04:00
site_settings.json Add trailing LF to text files 2022-05-10 21:05:51 -04:00
supervisord.conf Add migrations using alembic. 2022-05-17 18:55:17 -05:00

Build status

This code runs https://www.themotte.org .

Installation (Windows/Linux/MacOS)

1 - Install Docker on your machine.

Docker installation

2 - If hosting on localhost and/or without HTTPS, change"SESSION_COOKIE_SECURE" in __main__.py to "False"

3 - Run the following commands in the terminal:

git clone https://github.com/themotte/rDrama/

cd rDrama

docker-compose up

4 - That's it! Visit localhost in your browser.

5 - Optional: to change the domain from "localhost" to something else and configure the site settings, as well as integrate it with the external services the website uses, please edit the variables in the env file and then restart the docker container.

Run the E2E tests:

./run_tests.py