DevBox Landing Page
Git repository for frontend and backend for the DevBox landing page and email collection service.
Development Setup
Set up development environment with Python venv
We use pythons built in module, venv, to create an isolated python environment.
Python Documentation for virtual environments
Initialize the virtual environment
The following command initializes the virtual environment in the .venv/
-dirctory
python3 -m venv .venv
Then you use one of the following commands to activate the virtual environment in your current shell session
Bash
source .venv/bin/activate
Fish
source .venv/bin/activate.fish
Install python modules
Now you can install the python modules for this project with the following command
pip3 install -r requirements.txt
Add a new module to requirements.txt
Run the following commands to install a new module and add it to the requirements.txt
-file.
In this example we install the SQLAlchemy
-module.
pip3 install SQLAlchemy
python3 -m pip freeze > requirements.txt
Upgrade pip3 modules
List outdated modules
pip3 list --outdated
Upgrade all outdated modules
pip3 list -o | cut -f1 -d' ' | tr " " "\n" | awk '{if(NR>=3)print}' | cut -d' ' -f1 | xargs -n1 pip3 install -U
Save changes to requirements.txt
python3 -m pip freeze > requirements.txt
Building and running with Docker or Podman
Docker
docker build -t devbox-back:latest .
docker run --rm -it -p "8000:8000" -v './db:/usr/src/app/db' devbox-back:latest
Podman
podman build -t devbox-back:latest .
podman run --rm -it -p "8000:8000" -v './db:/usr/src/app/db' devbox-back:latest
Description
Languages
Python
61.6%
JavaScript
15.4%
CSS
11.7%
HTML
8.6%
Shell
2.2%
Other
0.5%