Skip to content

Commit

Permalink
Update server-build.yaml and remove production-build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
suenot committed Mar 2, 2024
1 parent 096d6f1 commit faafd5d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 100 deletions.
86 changes: 0 additions & 86 deletions .github/workflows/production-build.yaml

This file was deleted.

43 changes: 29 additions & 14 deletions .github/workflows/server-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
- name: Update dependencies
run: |
sudo apt-get update && sudo apt-get upgrade
sudo apt install -y git curl docker.io docker-compose
- name: Install dependencies
run: |
sudo apt install -y git curl
- name: Allow ports 3006 and 3007
run: |
sudo ufw allow 3006
sudo ufw allow 3007
- name: Set up Docker
run: |
sudo groupadd docker
sudo usermod -aG docker $USER
docker run hello-world
docker rm $(docker ps -a -q --filter "ancestor=hello-world")
- name: Install Node Version Manager (NVM)
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Expand All @@ -52,8 +48,10 @@ jobs:
export MINIO_ACCESS_KEY=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'));")
export MINIO_SECRET_KEY=$(node -e "console.log(require('crypto').randomBytes(24).toString('hex'));")
# Create call-options.json
echo '{
- name: Create call-options.json
run: |
tee call-options.json << JSON
{
"operation": "run",
"envs": {
"DEEPLINKS_PUBLIC_URL": "http://$DEEPLINKS_HOST",
Expand All @@ -63,9 +61,26 @@ jobs:
"NEXT_PUBLIC_DEEPLINKS_SERVER": "http://$DEEPCASE_HOST",
"NEXT_PUBLIC_ENGINES_ROUTE": "0",
"NEXT_PUBLIC_DISABLE_CONNECTOR": "1",
"JWT_SECRET": "{\"type\":\"HS256\",\"key\":\"$(node -e "console.log(require('crypto').randomBytes(50).toString('base64'));")\"}",
"JWT_SECRET": "'{\"type\":\"HS256\",\"key\":\"$(node -e "console.log(require('crypto').randomBytes(50).toString('base64'));")\"}'",
"DEEPLINKS_HASURA_STORAGE_URL": "http://host.docker.internal:8000/",
"HASURA_GRAPHQL_ADMIN_SECRET": "$HASURA_ADMIN_SECRET",
"MIGRATIONS_HASURA_SECRET": "$HASURA_ADMIN_SECRET"
"MIGRATIONS_HASURA_SECRET": "$HASURA_ADMIN_SECRET",
"DEEPLINKS_HASURA_SECRET": "$HASURA_ADMIN_SECRET",
"POSTGRES_PASSWORD": "$POSTGRES_PASSWORD",
"HASURA_GRAPHQL_DATABASE_URL": "postgres://postgres:$POSTGRES_PASSWORD@postgres:5432/postgres",
"POSTGRES_MIGRATIONS_SOURCE": "postgres://postgres:[email protected]:5432/postgres?sslmode=disable",
"RESTORE_VOLUME_FROM_SNAPSHOT": "0",
"MANUAL_MIGRATIONS": "1",
"MINIO_ROOT_USER": "$MINIO_ACCESS_KEY",
"MINIO_ROOT_PASSWORD": "$MINIO_SECRET_KEY",
"S3_ACCESS_KEY": "$MINIO_ACCESS_KEY",
"S3_SECRET_KEY": "$MINIO_SECRET_KEY"
}
}' > call-options.json
}
JSON
- name: Run deeplinks
run: |
export DEEPLINKS_CALL_OPTIONS=$(cat call-options.json)
export DEBUG="deeplinks:engine:*,deeplinks:migrations:*"
deeplinks

0 comments on commit faafd5d

Please sign in to comment.