diff --git a/.github/workflows/build-deploy-by-pull-request.yml b/.github/workflows/build-deploy-by-pull-request.yml index 68a5c0d..57c3429 100644 --- a/.github/workflows/build-deploy-by-pull-request.yml +++ b/.github/workflows/build-deploy-by-pull-request.yml @@ -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,15 +95,15 @@ 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 }} \ @@ -111,12 +111,12 @@ jobs: # 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/ghcr-delete-image-action@v1.1.0 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/ghcr-delete-image-action@v1.1.0 with: owner: ${{ github.repository_owner }} - name: kontrol/frontend + name: simbolik/frontend token: ${{ secrets.GITHUB_TOKEN }} untagged-keep-latest: 1 diff --git a/.github/workflows/build-deploy-by-push-action.yml b/.github/workflows/build-deploy-by-push-action.yml index 4c8cdaa..a1f0fd0 100644 --- a/.github/workflows/build-deploy-by-push-action.yml +++ b/.github/workflows/build-deploy-by-push-action.yml @@ -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/ghcr-delete-image-action@v1.1.0 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/ghcr-delete-image-action@v1.1.0 with: owner: ${{ github.repository_owner }} - name: kontrol/frontend + name: simbolik/frontend token: ${{ secrets.GITHUB_TOKEN }} untagged-keep-latest: 1 diff --git a/.github/workflows/close-pull-request.yml b/.github/workflows/close-pull-request.yml index 5fdb83a..1dd5523 100644 --- a/.github/workflows/close-pull-request.yml +++ b/.github/workflows/close-pull-request.yml @@ -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/ghcr-delete-image-action@v1.1.0 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/ghcr-delete-image-action@v1.1.0 with: owner: ${{ github.repository_owner }} - name: kontrol/frontend + name: simbolik/frontend token: ${{ secrets.GITHUB_TOKEN }} tag: pr-${{github.event.number}} diff --git a/backend/.gitignore b/backend/.gitignore index 479dc4a..0ba7852 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -34,7 +34,7 @@ lerna-debug.log* !.vscode/launch.json !.vscode/extensions.json -# ERCX +# simbolik .env database.sqlite database.sqlite-journal diff --git a/backend/generate-env.sh b/backend/generate-env.sh index 52df140..cf3ada6 100755 --- a/backend/generate-env.sh +++ b/backend/generate-env.sh @@ -7,4 +7,4 @@ set -e # We use either $CHANGE_BRANCH of $BRANCH_NAME branch_name=${CHANGE_BRANCH:-$BRANCH_NAME} -echo "DATABASE_URL=\"postgresql://$ERCX_POSTGRES_USERNAME:$ERCX_POSTGRES_PASSWD@$ERCX_POSTGRES_HOST_AND_PORT/$ERCX_POSTGRES_DB?schema="$BRANCH_NAME"&connection_limit=40&pool_timeout=30\"" >>.env +echo "DATABASE_URL=\"postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST_AND_PORT/$POSTGRES_DB?schema="$BRANCH_NAME"&connection_limit=40&pool_timeout=30\"" >>.env diff --git a/backend/sample.env b/backend/sample.env index 1067744..8008080 100644 --- a/backend/sample.env +++ b/backend/sample.env @@ -13,8 +13,8 @@ POSTGRES_USER=some_user POSTGRES_PASSWORD=some_password # Postgres connection string. -# "ercx" is the name of the database. See https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING. -DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/db?schema=${BRANCH_NAME}&connection_limit=40&pool_timeout=30 +# "simbolik" is the name of the database. See https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING. +DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/simbolik?schema=${BRANCH_NAME}&connection_limit=40&pool_timeout=30 # Password to encrypt the JWT tokens @@ -41,7 +41,7 @@ GOOGLE_CLIENT_SECRET=xxxx # The client secret of the Google OAuth app. # The key below is for local development: RECAPTCHA_SECRET_KEY=6Ld9pOUjAAAAAGIDO3K3KSrYomGt4ty0SXRpCHTz -GITHUB_WORKFLOW_TRIGGER_TOKEN=xxxx # The rv-auditor GitHub token. Used to dispatch the GitHub workflow in runtimeverification/ercx-website repository. +GITHUB_WORKFLOW_TRIGGER_TOKEN=xxxx # The rv-auditor GitHub token. Used to dispatch the GitHub workflow in runtimeverification/simbolik repository. # SMTP server configuration. EMAIL_HOST=smtp.google.com diff --git a/backend/src/github/github.service.ts b/backend/src/github/github.service.ts index de3dd63..68dcc65 100644 --- a/backend/src/github/github.service.ts +++ b/backend/src/github/github.service.ts @@ -19,7 +19,7 @@ export class GithubService { async importAdmins(): Promise { const response = await this.octokit.rest.teams.listMembersInOrg({ org: 'runtimeverification', - team_slug: 'ercx', + team_slug: 'web', }); const users = await this.prismaService.$transaction( diff --git a/backend/src/graphql/graphql.service.ts b/backend/src/graphql/graphql.service.ts index 1ce558d..a5f8abf 100644 --- a/backend/src/graphql/graphql.service.ts +++ b/backend/src/graphql/graphql.service.ts @@ -23,7 +23,7 @@ export class GqlOptionsService implements GqlOptionsFactory { return { driver: ApolloDriver, debug: process.env.NODE_ENV !== 'production', - playground: { title: 'ERCx GraphQL Playground' }, + playground: { title: 'simbolik GraphQL Playground' }, subscriptions: { 'graphql-ws': this.subscriptionConfig, 'subscriptions-transport-ws': this.subscriptionConfig, diff --git a/backend/src/main.ts b/backend/src/main.ts index fc8f666..0260224 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -35,8 +35,8 @@ async function bootstrap() { const configService: ConfigService = app.get(ConfigService); const swaggerConfig = new DocumentBuilder() - .setTitle('ERCX Website') - .setDescription('The ERCX Website API description') + .setTitle('Simbolik Website') + .setDescription('The Simbolik Website API description') .setVersion('0.1.0') .addBearerAuth() .build(); diff --git a/frontend/components/Account.tsx b/frontend/components/Account.tsx index 2de2ae8..6e32cb8 100644 --- a/frontend/components/Account.tsx +++ b/frontend/components/Account.tsx @@ -71,7 +71,7 @@ export default function Account() { return ( <> - {'Account | Kontrol Website'} + {'Account | Simbolik Website'}
diff --git a/frontend/next-sitemap.config.js b/frontend/next-sitemap.config.js index 0b64e86..1b1a993 100644 --- a/frontend/next-sitemap.config.js +++ b/frontend/next-sitemap.config.js @@ -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'] }; diff --git a/frontend/pages/_app.tsx b/frontend/pages/_app.tsx index 4824521..787739a 100644 --- a/frontend/pages/_app.tsx +++ b/frontend/pages/_app.tsx @@ -5,7 +5,7 @@ import { GoogleReCaptchaProvider } from 'react-google-recaptcha-v3'; import AppWrapper from '@/containers/AppWrapper'; import getConfig from 'next/config'; -export default function KontrolApp({ Component, pageProps }: AppProps) { +export default function SimbolikApp({ Component, pageProps }: AppProps) { const { publicRuntimeConfig: { reCaptchaKey } } = getConfig(); @@ -21,7 +21,7 @@ export default function KontrolApp({ Component, pageProps }: AppProps) { ); } -KontrolApp.getInitialProps = async ( +SimbolikApp.getInitialProps = async ( context: AppContext ): Promise => { const ctx = await App.getInitialProps(context);