GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rdempsey/testdriven-app: Microservices with Docker, Flask, and React

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
services
services
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
README.md
README.md
 
 
docker-compose-dev.yml
docker-compose-dev.yml
 
 
docker-compose-prod.yml
docker-compose-prod.yml
 
 
setup_database.sh
setup_database.sh
 
 

Repository files navigation

Microservices with Docker, Flask, and React

Build Status

This application is an example of a micro-services architecture using Docker, Flask and React from the online course, Microservices with Docker, Flask, and React

Manage the Application

  • Deploy the application: docker-compose -f docker-compose-dev.yml up -d --build
  • Create the database: docker-compose -f docker-compose-dev.yml run users python manage.py recreate-db
  • Seed the database: docker-compose -f docker-compose-dev.yml run users python manage.py seed-db
  • Run the Python tests: docker-compose -f docker-compose-dev.yml run users python manage.py test
  • Run the Python tests with coverage: docker-compose -f docker-compose-dev.yml run users python manage.py cov
  • Run Flake8: docker-compose -f docker-compose-dev.yml run users flake8 project
  • Run the client-side (npm) tests: docker-compose -f docker-compose-dev.yml run client npm test
  • Access the container logs: docker-compose -f docker-compose-dev.yml logs -f
  • Access the Postgres container: docker-compose -f docker-compose-dev.yml exec users-db psql -U postgres

Run a Multi-Stage Docker Build for the Client

docker build -f Dockerfile-prod -t "test" ./ \
  --build-arg NODE_ENV=development \
  --build-arg REACT_APP_USERS_SERVICE_URL=http://127.0.0.1

Running Database Migrations

  • Create a migration repository: docker-compose -f docker-compose-dev.yml run users python manage.py db init
  • Generate an initial migration: docker-compose -f docker-compose-dev.yml run users python manage.py db migrate
  • Apply the migrations to the database: docker-compose -f docker-compose-dev.yml run users python manage.py db upgrade

Access the Application

  • Homepage: http://localhost
  • Users: http://localhost/users

Working With the Postgres Database

Once you access the Postgres database (see above):

  • Choose the users_dev database: # \c users_dev
  • Describe the users table: # \d+ users
  • Select all of the users: # select * from users;

About

Microservices with Docker, Flask, and React

Topics

dockerflaskmicroservicesreact

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.