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

#145 - production deployment #154

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
9af50fb
- files for preparing prod deployment
Blusia Sep 19, 2024
418a251
- add volume to prod docker-compose and add script for test create da…
Blusia Sep 19, 2024
2861e7c
- add volume to prod docker-compose and add script for test create da…
Blusia Sep 19, 2024
b207739
- delete script and update docker-compose
Blusia Sep 23, 2024
2aca15c
- changes in secrets
Blusia Sep 23, 2024
15cf549
- changes in secrets
Blusia Sep 23, 2024
2f2fb13
- add secrets
Blusia Sep 23, 2024
096552c
- update docker-compose.yml
Blusia Sep 23, 2024
9b7e027
Merge remote-tracking branch 'origin/main' into #145-production-deplo…
Blusia Sep 23, 2024
3f62928
- changes in .env's and workflow
Blusia Sep 23, 2024
daa2600
- changes in .env
Blusia Sep 23, 2024
9e15539
- changed to previous version
Blusia Sep 23, 2024
d3460fc
- add no-index-robots to traefik middleware in docker-compose.prod
Blusia Sep 24, 2024
a0173c9
- env's update
Blusia Sep 24, 2024
da8b926
- change volume name
Blusia Sep 25, 2024
6147635
- update env's
Blusia Sep 25, 2024
40f7691
- update docker-compose.prod
Blusia Sep 26, 2024
4a05de5
- update env
Blusia Sep 26, 2024
078ec3b
- update docker-compose.prod
Blusia Sep 26, 2024
b539e24
- update workflow
Blusia Sep 26, 2024
b77723b
- update workflow
Blusia Sep 26, 2024
d811db2
Merge remote-tracking branch 'origin/main' into #145-production-deplo…
Blusia Sep 26, 2024
5721242
- add sleep to Makefile
Blusia Sep 26, 2024
146d1f4
- update post-deploy-actions
Blusia Sep 26, 2024
65434ac
- update .env's
Blusia Sep 26, 2024
9400201
#145 - production seeder
krzysztofrewak Sep 26, 2024
2307175
#145 - csf
krzysztofrewak Sep 26, 2024
55ee188
Merge remote-tracking branch 'origin/#145-seeder' into #145-productio…
Blusia Sep 27, 2024
c8b87d6
- add -p flag for test
Blusia Sep 27, 2024
72671b8
- update post deploy actions
Blusia Sep 27, 2024
9dbb22e
- update files
Blusia Sep 27, 2024
5b8cfc6
- update files
Blusia Sep 27, 2024
f37c09e
- update docker compose
Blusia Sep 27, 2024
ed3156b
- changes replcas to previous
Blusia Sep 27, 2024
171f0b6
- changed in deployment files
Blusia Sep 30, 2024
f052e40
- changes in deployment files
Blusia Sep 30, 2024
8c9a638
- update Makefile
Blusia Sep 30, 2024
37ceb2e
- update value for docker meta
Blusia Sep 30, 2024
09974af
- update env's
Blusia Sep 30, 2024
6a559b8
- add --no-prune
Blusia Sep 30, 2024
a607295
- add 2>/dev/null
Blusia Sep 30, 2024
d0ec2ee
- add || true
Blusia Sep 30, 2024
1ff2c36
- test 2>&1
Blusia Sep 30, 2024
7e84a73
- update files
Blusia Sep 30, 2024
60e80f0
- update docker-compose.prod
Blusia Sep 30, 2024
f3b21e9
- update db environment in docker compose dbprod
Blusia Oct 1, 2024
12eee0c
- add readme.prod.md
Blusia Oct 1, 2024
d70df93
- update readme.md
Blusia Oct 1, 2024
7086700
Merge remote-tracking branch 'origin/main' into #145-production-deplo…
Blusia Oct 2, 2024
f7679b8
- update post-deploy-actions
Blusia Oct 2, 2024
6f17c2e
- update name and readme.md
Blusia Oct 2, 2024
f4a381a
- add info
Blusia Oct 2, 2024
8ae14d8
- update production_deployment.md
Blusia Oct 7, 2024
eaa3182
- added Hosts for krewak app
Blusia Oct 10, 2024
16d8af8
Merge remote-tracking branch 'origin/main' into #145-production-deplo…
Blusia Oct 10, 2024
3dcc9ac
- deleted inactive host
Blusia Oct 11, 2024
d8adeaf
- add sentry to .env.prod
Blusia Oct 22, 2024
fb16ac2
Merge remote-tracking branch 'origin/main' into #145-production-deplo…
Blusia Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ npm run lintf
| app | keating-app-dev | [53851](http://localhost:53851) |
| database | keating-db-dev | 53853 |
| redis | keating-redis-dev | 53852 |

### Further reading
* [Production deployment](./readme.prod.md)
21 changes: 21 additions & 0 deletions readme.prod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Keating
mtracz marked this conversation as resolved.
Show resolved Hide resolved
### Production deployment

Implementing a new Keating app into production

To add a new Keating app, several steps must be completed:

1. First you need to create a new database for the new application instance in the existing production container `keating-prod-database`;
1. `CREATE DATABASE database_name;`
2. `CREATE USER user_name WITH ENCRYPTED PASSWORD 'password';`
3. `GRANT ALL PRIVILEGES ON DATABASE database_name TO user_name;`
4. `\c database_name`
5. `GRANT CREATE ON SCHEMA public TO user_name;`
2. Then follow a few steps to prepare the files for application deployment
* add a new option in your workflow to be able to trigger a workflow for a specific Keating app user deployment - (example: pnowak);
* create a new directory in the specified path - `environment/prod/deployment/prod/apps` - the directory must be named like AppName option from workflow (example: pnowak);
* please remember that `env.prod` and `.env.prod.secrets` must be created in the indicated folder (btw. the SOPS_AGE encryption and decryption key is located on Infisical);
* then, to implement a new keating app, trigger the workflow by selecting the app name option that is to be implemented - (example: keating-prod-pnowak-app-container).
3. After a successful first deployment,you can execute the command in the application container:
* ProductionSeeder to run for application installation: `php artisan db:seed --class=ProductionSeeder`
* command `php artisan cache:flush` to flush cached page title and external schedule link
Loading