Skip to content

Create Docker Containers for Backend and DB#6

Open
KentTran2302 wants to merge 1 commit intomainfrom
docker_development
Open

Create Docker Containers for Backend and DB#6
KentTran2302 wants to merge 1 commit intomainfrom
docker_development

Conversation

@KentTran2302
Copy link
Owner

@KentTran2302 KentTran2302 commented May 21, 2023

What does this PR do?

  • Dockerize backend development environment
  • Add debugpy debugger

Pre-requisites

Install Docker Desktop: [(https://www.docker.com/products/docker-desktop/)]

How should this be tested?

Setup

Ensure you have Docker Desktop installed and opened. Then run

docker compose up -d --build

This is a sample .env file you can use to test:

DB_HOST = "martinrea_db"
DB_USER = "<your-db-username>"
DB_PASS = "<your-db-password>"
DB_PORT = 5432
DB_NAME = "martinrea"
FLASK_ENV = development

MONGO_DB_USERNAME = "<your-mongo-db-atlas-username>"
MONGO_DB_PASSWORD ="<your-mongo-db-atlas-password"

Note the DB_PORT environment variable, do not use PORT since deployment service like Fly.io will set a PORT environment variable for the deployed server

  • Please note that you can either use MySQL, PostgreSQL or SQLite to store the data but don't forget to change the URI and the engine connection to the database on your local machine.

  • One more thing, this doesn't work yet since there are some conflict in the dependencies, I will take a closer look when I have time to solve this dependencies in the Pipfile and Pipfile.lock.

@KentTran2302 KentTran2302 added enhancement New feature or request help wanted Extra attention is needed labels May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant