-Zach Neill.
The Gab/Duel Folks allows people with opinions to gab with and duel each other online.
Only Docker is needed. This is great news for anyone with a Linux kernel (or we lucky few who got Docker Desktop for Windows to work).
To run this app in production-mode:
- Set the docker-compose.yaml services-->web-->build-->dockerfile
to
Dockerfile
- Comment out services-->web-->
volumes: ['./flask:/app']
docker compose up
- If it fails, just run it again. Sometimes the database isn't ready in time,
even in spite of
depends_on
.
- If it fails, just run it again. Sometimes the database isn't ready in time,
even in spite of
- Navigate to localhost:8080
- Not to be confused with localhost:5000!!!
To take down any of the layers, run docker compose down
. To
remove a specific layer like the database, run docker compose down db
Sometimes on startup on Windows, Docker throws a docker-credential-desktop
error. Fix it with source docker-credential-fix.sh
To run this app in a development setting:
docker compose up -d db
- This command starts the postgres database on port 5432
docker compose up -d nginx
- Set the docker-compose.yaml web-->build-->dockerfile to
Dockerfile.dev
- Make sure services-->web-->
volumes: ['./flask:/app']
is uncommented docker compose up web
- For extra measure, you can run
docker compose up web --build
- For extra measure, you can run
- Navigate to localhost:8080
source setup.sh
flask run
ctrl+c
to stop the server,flask run
to rerun it
- Navigate to localhost:5000
- Not to be confused with localhost:8080!!!
Pytest is the testing framework. The unit and functional tests are in the tests directory in flask-->tests.
The app uses Coverage.py. For a coverage report, cd
into the
flask directory and run source run_coverage.sh
. Or, run
coverage run -m pytest
followed by
coverage report --omit="*/test*,*/__init__.py,database.py,*/conftest.py"
For a linting test, run python -m pylint flask/app
or
python -m pylint app
if you are in the flask directory.
A Travis CI pipeline is currently being set up.
- Flask
- Front end and api
- Gunicorn/Flask
- Server
- nginx
- Load balancing/server
- PostgreSQL
- Database
- Flask-SQLAlchemy
- ORM
- Docker
- Containerization
- Pytest/Pylint
- Testing
- Travis CI
- CI/CD pipeline
- Fix tests
- Travis CI
- Edit profile
- Request friends