-
Notifications
You must be signed in to change notification settings - Fork 384
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
Staging apps via github actions #579
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0e686ea
WIP
justin808 741fd20
WIP
justin808 edd6756
update build image and cpl 1.2.0
justin808 0e33d19
change entry-point
justin808 ea25573
WIP
justin808 c2f22a1
WIP
justin808 4e1d301
WIP
justin808 b442d58
WIP
justin808 b603c30
WIP
justin808 e5c83d7
WIP
justin808 fa6116a
WIP
justin808 43b2939
WIP
justin808 4e6b4c9
WIP
justin808 6815537
WIP
justin808 acaddd6
WIP
justin808 c777bb5
WIP
justin808 8b1af43
WIP
justin808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ You can see the definition of Postgres and Redis in the `.controlplane/templates | |
|
||
1. Ensure your [Control Plane](https://controlplane.com) account is set up. | ||
You should have an `organization` `<your-org>` for testing in that account. | ||
You will modify value for `aliases.common.cpln_org` in `.controlplane/controlplane.yml`. | ||
Set ENV variable `CPLN_ORG` to `<your-org>`. Alternatively, you may modify the | ||
value for `aliases.common.cpln_org` in `.controlplane/controlplane.yml`. | ||
If you need an organization, please [contact Shakacode](mailto:[email protected]). | ||
|
||
2. Install Control Plane CLI (and configure access) using `npm install -g @controlplane/cli`. | ||
|
@@ -58,10 +59,10 @@ and not `cpln` which is the Control Plane CLI. | |
|
||
```sh | ||
# Use environment variable to prevent repetition | ||
export APP_NAME=tutorial-app | ||
export APP_NAME=react-webpack-rails-tutorial | ||
|
||
# Provision all infrastructure on Control Plane. | ||
# app tutorial-app will be created per definition in .controlplane/controlplane.yml | ||
# app react-webpack-rails-tutorial will be created per definition in .controlplane/controlplane.yml | ||
cpl apply-template gvc postgres redis rails daily-task -a $APP_NAME | ||
|
||
# Build and push docker image to Control Plane repository | ||
|
@@ -83,11 +84,11 @@ cpl open -a $APP_NAME | |
|
||
### Promoting code updates | ||
|
||
After committing code, you will update your deployment of `tutorial-app` with the following commands: | ||
After committing code, you will update your deployment of `react-webpack-rails-tutorial` with the following commands: | ||
|
||
```sh | ||
# Assuming you have already set APP_NAME env variable to tutorial-app | ||
# Build and push new image with sequential image tagging, e.g. 'tutorial-app:1', then 'tutorial-app:2', etc. | ||
# Assuming you have already set APP_NAME env variable to react-webpack-rails-tutorial | ||
# Build and push new image with sequential image tagging, e.g. 'react-webpack-rails-tutorial:1', then 'react-webpack-rails-tutorial:2', etc. | ||
cpl build-image -a $APP_NAME | ||
|
||
# Run database migrations (or other release tasks) with latest image, | ||
|
@@ -102,7 +103,7 @@ cpl deploy-image -a $APP_NAME | |
If you needed to push a new image with a specific commit SHA, you can run the following command: | ||
|
||
```sh | ||
# Build and push with sequential image tagging and commit SHA, e.g. 'tutorial-app:123_ABCD' | ||
# Build and push with sequential image tagging and commit SHA, e.g. 'react-webpack-rails-tutorial:123_ABCD' | ||
cpl build-image -a $APP_NAME --commit ABCD | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -e | ||
|
||
echo 'Running release_script.sh per controlplane.yml' | ||
|
||
echo 'Run DB migrations' | ||
./bin/rails db:prepare | ||
|
||
echo 'Completed release_script.sh per controlplane.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
kind: workload | ||
name: maintenance | ||
spec: | ||
type: standard | ||
containers: | ||
- name: maintenance | ||
env: | ||
- name: PORT | ||
value: "3000" | ||
- name: PAGE_URL | ||
value: "" | ||
image: "shakacode/maintenance-mode" | ||
ports: | ||
- number: 3000 | ||
protocol: http | ||
defaultOptions: | ||
autoscaling: | ||
minScale: 1 | ||
maxScale: 1 | ||
capacityAI: false | ||
timeoutSeconds: 60 | ||
firewallConfig: | ||
external: | ||
inboundAllowCIDR: | ||
- 0.0.0.0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,3 @@ yarn-debug.log* | |
.github/ | ||
spec/ | ||
scripts/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@borela is this typical? Without, the file permissions were unset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means the files were committed to the repo without +x permission, you can fix that, commit the files again, and remove that chmod.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did and it didn't fix the issue.