Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize app + Transfer code #2

Merged
merged 15 commits into from
Sep 30, 2021
Merged

Initialize app + Transfer code #2

merged 15 commits into from
Sep 30, 2021

Conversation

machikoyasuda
Copy link
Member

@machikoyasuda machikoyasuda commented Sep 28, 2021

closes #1
closes #3

What this PR does

  • Transfers required localhost/server files from Benefits app
  • Creates 2 Dockerfiles: One for production (Dockerfile - runs a non-root user, no dev tooling, runs flask app), one for development (Dockerfile.dev - runs production with a root user, installs dev tooling and python tooling)
  • Creates docker-compose.yml for development that defines 2 services: server for production and dev for development. dev runs Dockerfile.dev with FLASK environment variables, debugger port defined and runs app.py directly
  • Defines .devcontainer file for development that starts the dev service from docker-compose.yml

How to run this PR

Initial build

  • docker-compose build server

Launch in DevContainer + Debug mode

  • Launch in Container on VS Code
  • (May have to restart for extensions to work)
  • Run in Debug mode
  • Add breakpoint
  • open localhost:5000
  • server check: curl http://localhost:5000/ -iv

@machikoyasuda
Copy link
Member Author

image
image
2 issues so far with this setup:

  1. No Git
  2. No permissions to save files!

@machikoyasuda machikoyasuda changed the title WIP - Setting up .devcontainer WIP - Initialize app Sep 28, 2021
@machikoyasuda machikoyasuda changed the title WIP - Initialize app WIP - Initialize app + Transfer code Sep 29, 2021
@machikoyasuda machikoyasuda marked this pull request as ready for review September 29, 2021 19:44
@machikoyasuda machikoyasuda changed the title WIP - Initialize app + Transfer code Initialize app + Transfer code Sep 29, 2021
Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great so far! I was able to get the devcontainer running locally and hit a breakpoint with debug mode active.

I made a few suggestions, nothing major. There was one minor fix to the docs.

.pyup.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
app.py Outdated Show resolved Hide resolved
@machikoyasuda machikoyasuda merged commit 0104d66 into main Sep 30, 2021
@machikoyasuda machikoyasuda deleted the config/dev-container branch September 30, 2021 22:51
@angela-tran angela-tran mentioned this pull request Nov 14, 2022
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initial server code Initializing repo checklist
2 participants