reidhansell / Market-Mock

A web application for paper-trading. Made with React and Node.
MIT License
0 stars 0 forks source link

Refine deployment process #64

Open reidhansell opened 8 months ago

reidhansell commented 8 months ago

Overview

Current Behavior

Currently, building and deploying is a pain

Desired Behavior

I would like seamless, potentially automatic builds and deployments

Use Cases

Just let me code :(

Technical Scope

Unsure. Will comment below

reidhansell commented 3 months ago

I think the goal should be:

  1. Add back end config.json data to .env
  2. Delete back end config.json
  3. Download npm env package to read env in js
  4. See if possible to move front end config/.env into back end .env
  5. Add theme build to build script
  6. Split single .env into .env.prod and .env.dev
  7. Adjust npm script so that prod does NOT build, only serves built files
  8. Adjust Docker scripts to use .env.prod
  9. See if possible to adjust docker scripts so that it builds first (in theory all prod stuff should be done with "docker build" which builds theme, back end, and front end, and all dev stuff should be done with "npm run start" and "cd client, npm run start" in two terminals. Dev environment should be as clean as possible, though dev will need to build the theme? idk, i'm tired
reidhansell commented 3 months ago

I probably won't remember this later so here's a note. Main dif (I think) between dev and prod configs is that the DB name is localhost/marketmock-mysql-container and serverURL is localhost/marketmock.app