Backend of QAShot microsite
- Refactor
queue
andmailer
to use migrations, too.
cp .env.example .env
- Edit
.env
as needed
- Edit
./docker.startup.prod.sh
- Set up the database
- Create the database
- Note: This is handled by the bitnami postgres images.
- Initialize migrations
docker-compose exec web sh -c "sequelize db:migrate:schema:timestamps:add && sequelize db:migrate"
- Create the database
-
Enter the container of the given service
- E.g
docker-compose exec web
- E.g
-
Run the required command
- E.g
sequelize migration:generate
- E.g
-
If your changes affect the model, alter it manually
- E.g adding a new column to a table via migrations has to be reflected in the model of the table. This (sadly) is not automatic.
-
Build new images locally
-
Test with the prod commands
-
If it's OK push the new image to docker hub
- Update the .env file (if needed)
- Pull images on the target instance
- Run db migrations