leaguedex
leaguedex copied to clipboard
DevOps Wishlist
- 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
- Currently building/deploying new code causes resources to spike
- 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
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.
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.
those commands inside bootstrap.sh, are they being executed inside docker containers ?
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!
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 ?