leaguedex icon indicating copy to clipboard operation
leaguedex copied to clipboard

DevOps Wishlist

Open sidpalas opened this issue 3 years ago • 5 comments

  • Provisioning VPS
    • Terraform or IaC (Infrastructure as Code) tool
    • DO CLI
  • Configuring VPS (dependencies)
    • setup.sh script
  • Single VPS
    • Currently building/deploying new code causes resources to spike
      • Could do build on GH Actions runners
  • Dockerize
    • Would help alleviate configuration challenges
    • How to handle load balancing across instances?
  • Database
    • Improve the backup strategy
    • Move DB to its own instance (or to Hosted DB on Digital Ocean)
  • Test suite
    • Currently, hard to add new features b/c of lack of tests and coupling
    • Tests in the works! (planning to write them when refactoring)
  • Isolate staging / production
  • Move front-end to another location (Netlify? s3? GCS?)
  • Adding build step for server
    • Necessary for migrating to typescript

sidpalas avatar Apr 30 '21 15:04 sidpalas

From our discussion, the following seem like the most value add:

TODO:

  • [x] Dockerize application
  • [x] Set up docker-compose for local dev
  • [ ] Update GitHub Action to use new Docker approach
  • [x] Set up new droplet with docker configured
  • [x] Migrate DB data to new instance 😳
  • [ ] Set up automated DB backups

Deemed Unnecessary:

  • [ ] Docker swarm config.

sidpalas avatar Apr 30 '21 17:04 sidpalas

TODO from 2021-05-07 Stream:

  • [x] Debug client proxy for dockerized version of client
  • [x] Debug environment variables for top level docker-compose config

Issue was that the DB was not getting properly seeded/migrated in the docker-compose setup. Modified bootstrap.sh to use with docker compose.

sidpalas avatar May 07 '21 16:05 sidpalas

those commands inside bootstrap.sh, are they being executed inside docker containers ?

ismailalabou avatar May 07 '21 21:05 ismailalabou

those commands inside bootstrap.sh, are they being executed inside docker containers ?

Previously they were not being executed inside the container. I updated the CMD in the server Dockerfile here: https://github.com/sidpalas/leaguedex/blob/8fa930a8ec8963e34ee4ab9b6111e6dba18161fb/server/Dockerfile#L17 to run it there.

For the non-development version of the image we will probably want to extract it out such that the seeding/migration of the DB is separate from the application, but that was the fastest way to get it working for the dev environment!

sidpalas avatar May 07 '21 22:05 sidpalas

those commands inside bootstrap.sh, are they being executed inside docker containers ?

Previously they were not being executed inside the container. I updated the CMD in the server Dockerfile here: https://github.com/sidpalas/leaguedex/blob/8fa930a8ec8963e34ee4ab9b6111e6dba18161fb/server/Dockerfile#L17 to run it there.

For the non-development version of the image we will probably want to extract it out such that the seeding/migration of the DB is separate from the application, but that was the fastest way to get it working for the dev environment!

you are only migrating/seeding the database schema here, am I right ?

ismailalabou avatar May 07 '21 23:05 ismailalabou