Skip to content

juanoubi6/printmob-backend

Repository files navigation

Printmob-backend

Backend for Printmob app

Before running

  1. Create a .env file based on the .env.example file
  2. In the .env file, input the values for the environment variables. These variables will be passed to your local container.

Running the project with Docker

  1. Navigate to the root directory
  2. Run make build to create the containers
  3. Run make run to create the database and the backend (which in turn runs the database migrations).

Running the project locally in Pycharm

  1. Navigate to the root directory
  2. Run make build to create the containers
  3. Run make run. This will start the database and the application, running the migrations.
  4. Run docker ps, locate the backend container, and stop it with docker stop {containerId}.
  5. Run the run method of the wsgi.py file locally. You can run it in debug mode for more control.

Creating a new migration

  1. Run alembic revision -m "Description of the migration". This will create a file in the /alembic/versions directory.
  2. Modify the file by adding the migration (both the upgrade and downgrade).
  3. Run the migrations using alembic upgrade head (if you have it locally) or use make migrate.

Pushing container to AWS cloud

  1. Verify that there is an entry called printmob in the ~/.aws file.
  2. Run make push.
  3. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages