Backend for Printmob app
- Create a .env file based on the .env.example file
- In the .env file, input the values for the environment variables. These variables will be passed to your local container.
- Navigate to the root directory
- Run
make build
to create the containers - Run
make run
to create the database and the backend (which in turn runs the database migrations).
- Navigate to the root directory
- Run
make build
to create the containers - Run
make run
. This will start the database and the application, running the migrations. - Run
docker ps
, locate the backend container, and stop it with docker stop {containerId}. - Run the run method of the wsgi.py file locally. You can run it in debug mode for more control.
- Run
alembic revision -m "Description of the migration"
. This will create a file in the /alembic/versions directory. - Modify the file by adding the migration (both the upgrade and downgrade).
- Run the migrations using
alembic upgrade head
(if you have it locally) or usemake migrate
.
- Verify that there is an entry called printmob in the ~/.aws file.
- Run
make push
. - Go to the AWS console or use the CLI to kill the running container so that the new container that is launched uses the new image.