-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
45 additions
and
45 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
echo "FRONTEND_PORT=$FRONTEND_PORT" >> $GITHUB_OUTPUT | ||
echo "BACKEND_PORT=$BACKEND_PORT" >> $GITHUB_OUTPUT | ||
echo "HOST=$HOST" >> $GITHUB_OUTPUT | ||
echo "IMAGE_PREFIX=ghcr.io/runtimeverification/kontrol" >> $GITHUB_OUTPUT | ||
echo "IMAGE_PREFIX=ghcr.io/runtimeverification/simbolik" >> $GITHUB_OUTPUT | ||
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_OUTPUT | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
nginx_main_config="$(cat ${{ github.workspace }}/configs/nginx/nginx.conf)" | ||
|
@@ -95,28 +95,28 @@ jobs: | |
script: | | ||
source "/home/ubuntu/.acme.sh/acme.sh.env" | ||
PULL_REQUEST_NAME=$(printf "pr-%s" ${{ github.event.number }}) | ||
mkdir -p /opt/deployments/kontrol-$PULL_REQUEST_NAME | ||
cd /opt/deployments/kontrol-$PULL_REQUEST_NAME | ||
mkdir -p /opt/deployments/simbolik-$PULL_REQUEST_NAME | ||
cd /opt/deployments/simbolik-$PULL_REQUEST_NAME | ||
# Frontend | ||
docker pull ${{ needs.build.outputs.IMAGE_PREFIX }}/frontend:$PULL_REQUEST_NAME | ||
docker stop kontrol-frontend-$PULL_REQUEST_NAME | ||
docker rm kontrol-frontend-$PULL_REQUEST_NAME | ||
docker stop simbolik-frontend-$PULL_REQUEST_NAME | ||
docker rm simbolik-frontend-$PULL_REQUEST_NAME | ||
docker run -p ${{ needs.build.outputs.FRONTEND_PORT }}:3000 \ | ||
--name kontrol-frontend-$PULL_REQUEST_NAME \ | ||
--name simbolik-frontend-$PULL_REQUEST_NAME \ | ||
-d --restart=always \ | ||
-e GRAPHQL_ENDPOINT=https://${{ needs.build.outputs.HOST }}/graphql \ | ||
-e RECAPTCHA_SITE_KEY=${{ secrets.RECAPTCHA_SITE_KEY }} \ | ||
${{ needs.build.outputs.IMAGE_PREFIX }}/frontend:$PULL_REQUEST_NAME | ||
# Backend | ||
docker pull ${{ needs.build.outputs.IMAGE_PREFIX }}/backend:$PULL_REQUEST_NAME | ||
docker stop kontrol-backend-$PULL_REQUEST_NAME | ||
docker rm kontrol-backend-$PULL_REQUEST_NAME | ||
docker stop simbolik-backend-$PULL_REQUEST_NAME | ||
docker rm simbolik-backend-$PULL_REQUEST_NAME | ||
docker run -p ${{ needs.build.outputs.BACKEND_PORT }}:8080 \ | ||
--name kontrol-backend-$PULL_REQUEST_NAME \ | ||
--name simbolik-backend-$PULL_REQUEST_NAME \ | ||
-d --restart=always \ | ||
-e DATABASE_URL="postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@${{ secrets.POSTGRES_HOST }}:${{ secrets.POSTGRES_PORT }}/kontrol?schema=$PULL_REQUEST_NAME&connection_limit=40&pool_timeout=30" \ | ||
-e DATABASE_URL="postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@${{ secrets.POSTGRES_HOST }}:${{ secrets.POSTGRES_PORT }}/simbolik?schema=$PULL_REQUEST_NAME&connection_limit=40&pool_timeout=30" \ | ||
-e FRONTEND_URL=https://${{ needs.build.outputs.HOST }} \ | ||
-e GITHUB_CLIENT_ID=${{ secrets.GH_CLIENT_ID }} \ | ||
-e GITHUB_CLIENT_SECRET=${{ secrets.GH_CLIENT_SECRET }} \ | ||
|
@@ -224,13 +224,13 @@ jobs: | |
uses: bots-house/[email protected] | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
name: kontrol/backend | ||
name: simbolik/backend | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
untagged-keep-latest: 1 | ||
- name: Clean frontend untagged images | ||
uses: bots-house/[email protected] | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
name: kontrol/frontend | ||
name: simbolik/frontend | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
untagged-keep-latest: 1 |
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
- id: process-outputs | ||
name: Process Outputs | ||
run: | | ||
echo "IMAGE_PREFIX=ghcr.io/runtimeverification/kontrol" >> $GITHUB_OUTPUT | ||
echo "IMAGE_PREFIX=ghcr.io/runtimeverification/simbolik" >> $GITHUB_OUTPUT | ||
echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
nginx_main_config="$(cat ${{ github.workspace }}/configs/nginx/nginx.conf)" | ||
|
@@ -81,16 +81,16 @@ jobs: | |
port: 22 | ||
script: | | ||
source "/home/ubuntu/.acme.sh/acme.sh.env" | ||
mkdir -p /opt/deployments/kontrol-${{ github.ref_name }} | ||
cd /opt/deployments/kontrol-${{ github.ref_name }} | ||
mkdir -p /opt/deployments/simbolik-${{ github.ref_name }} | ||
cd /opt/deployments/simbolik-${{ github.ref_name }} | ||
# Frontend | ||
docker tag ${{ needs.build.outputs.IMAGE_PREFIX }}/frontend:${{ github.ref_name }} ${{ needs.build.outputs.IMAGE_PREFIX }}/frontend:${{ github.ref_name }}-backup | ||
docker pull ${{ needs.build.outputs.IMAGE_PREFIX }}/frontend:${{ github.ref_name }} | ||
docker stop kontrol-frontend-${{ github.ref_name }} || true | ||
docker rm kontrol-frontend-${{ github.ref_name }} || true | ||
docker stop simbolik-frontend-${{ github.ref_name }} || true | ||
docker rm simbolik-frontend-${{ github.ref_name }} || true | ||
docker run -p ${{ needs.build.outputs.FRONTEND_PORT }}:3000 \ | ||
--name kontrol-frontend-${{ github.ref_name }} \ | ||
--name simbolik-frontend-${{ github.ref_name }} \ | ||
-d --restart=always \ | ||
-e GRAPHQL_ENDPOINT=https://${{ needs.build.outputs.HOST }}/graphql \ | ||
-e RECAPTCHA_SITE_KEY=${{ secrets.RECAPTCHA_SITE_KEY }} \ | ||
|
@@ -99,12 +99,12 @@ jobs: | |
# Backend | ||
docker tag ${{ needs.build.outputs.IMAGE_PREFIX }}/backend:${{ github.ref_name }} ${{ needs.build.outputs.IMAGE_PREFIX }}/backend:${{ github.ref_name }}-backup | ||
docker pull ${{ needs.build.outputs.IMAGE_PREFIX }}/backend:${{ github.ref_name }} | ||
docker stop kontrol-backend-${{ github.ref_name }} || true | ||
docker rm kontrol-backend-${{ github.ref_name }} || true | ||
docker stop simbolik-backend-${{ github.ref_name }} || true | ||
docker rm simbolik-backend-${{ github.ref_name }} || true | ||
docker run -p ${{ needs.build.outputs.BACKEND_PORT }}:8080 \ | ||
--name kontrol-backend-${{ github.ref_name }} \ | ||
--name simbolik-backend-${{ github.ref_name }} \ | ||
-d --restart=always \ | ||
-e DATABASE_URL="postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@${{ secrets.POSTGRES_HOST }}:${{ secrets.POSTGRES_PORT }}/kontrol?schema=${{ github.ref_name }}&connection_limit=40&pool_timeout=30" \ | ||
-e DATABASE_URL="postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@${{ secrets.POSTGRES_HOST }}:${{ secrets.POSTGRES_PORT }}/simbolik?schema=${{ github.ref_name }}&connection_limit=40&pool_timeout=30" \ | ||
-e FRONTEND_URL=https://${{ needs.build.outputs.HOST }} \ | ||
-e GITHUB_CALLBACK_HOST=${{ needs.build.outputs.HOST }} \ | ||
-e GITHUB_CLIENT_ID=${{ secrets.GH_CLIENT_ID }} \ | ||
|
@@ -212,13 +212,13 @@ jobs: | |
uses: bots-house/[email protected] | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
name: kontrol/backend | ||
name: simbolik/backend | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
untagged-keep-latest: 1 | ||
- name: Clean frontend untagged images | ||
uses: bots-house/[email protected] | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
name: kontrol/frontend | ||
name: simbolik/frontend | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
untagged-keep-latest: 1 |
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
FRONTEND_PORT=$(printf "%d" $(expr 9000 + $PULL_REQUEST_NUMBER)) | ||
BACKEND_PORT=$(printf "%d" $(expr 10000 + $PULL_REQUEST_NUMBER)) | ||
HOST=$(printf "pr-%s.%s" ${{ github.event.number }} ${{ vars.HOST }}) | ||
echo "IMAGE_PREFIX=ghcr.io/runtimeverification/kontrol" >> $GITHUB_OUTPUT | ||
echo "IMAGE_PREFIX=ghcr.io/runtimeverification/simbolik" >> $GITHUB_OUTPUT | ||
echo "FRONTEND_PORT=$FRONTEND_PORT" >> $GITHUB_OUTPUT | ||
echo "BACKEND_PORT=$BACKEND_PORT" >> $GITHUB_OUTPUT | ||
echo "HOST=$HOST" >> $GITHUB_OUTPUT | ||
|
@@ -38,11 +38,11 @@ jobs: | |
script: | | ||
source "/home/ubuntu/.acme.sh/acme.sh.env" | ||
PULL_REQUEST_NAME=$(printf "pr-%s" ${{ github.event.number }}) | ||
docker stop kontrol-frontend-$PULL_REQUEST_NAME | ||
docker rm kontrol-frontend-$PULL_REQUEST_NAME | ||
docker stop kontrol-backend-$PULL_REQUEST_NAME | ||
docker rm kontrol-backend-$PULL_REQUEST_NAME | ||
rm -rfv /opt/deployments/kontrol-${PULL_REQUEST_NAME} | ||
docker stop simbolik-frontend-$PULL_REQUEST_NAME | ||
docker rm simbolik-frontend-$PULL_REQUEST_NAME | ||
docker stop simbolik-backend-$PULL_REQUEST_NAME | ||
docker rm simbolik-backend-$PULL_REQUEST_NAME | ||
rm -rfv /opt/deployments/simbolik-${PULL_REQUEST_NAME} | ||
cd /opt/deployments/nginx | ||
rm -rfv ./conf.d/${{ steps.process-outputs.outputs.HOST }}.conf | ||
rm -rfv ./ssl/${{ steps.process-outputs.outputs.HOST }} | ||
|
@@ -60,13 +60,13 @@ jobs: | |
uses: bots-house/[email protected] | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
name: kontrol/backend | ||
name: simbolik/backend | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: pr-${{github.event.number}} | ||
- name: Clean PR frontend image | ||
uses: bots-house/[email protected] | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
name: kontrol/frontend | ||
name: simbolik/frontend | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: pr-${{github.event.number}} |
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
siteUrl: | ||
process.env.NEXT_PUBLIC_SITE_URL || 'https://ercx.runtimeverification.com', | ||
process.env.NEXT_PUBLIC_SITE_URL || 'https://simbolik.runtimeverification.com', | ||
generateRobotsTxt: true, | ||
exclude: ['/account', '/access-token'] | ||
}; |
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