Skip to content

0.0.618

0.0.618 #1814

Workflow file for this run

name: Deploy deeplinks app
on:
push:
branches: [ main ]
paths-ignore:
- 'postgresql/**'
workflow_dispatch:
defaults:
run:
working-directory: ./
env:
DEEPLINKS_PUBLIC_URL: http://localhost:3006
NEXT_PUBLIC_DEEPLINKS_URL: http://localhost:3006
NEXT_PUBLIC_GQL_PATH: http://localhost:3006/gql
NEXT_PUBLIC_GQL_SSL: 0
NEXT_PUBLIC_DEEPLINKS_SERVER: http://localhost:3007
NEXT_PUBLIC_ENGINES_ROUTE: 0
NEXT_PUBLIC_DISABLE_CONNECTOR: 1
JWT_SECRET: '{"type":"HS256","key":"6HZ/FHOibbfr6FsGaArmXVwY1JEO+l2lTVDJeibc2yj2T6OKmx5dIw3UtMFBdUkhd9Q="}'
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"6HZ/FHOibbfr6FsGaArmXVwY1JEO+l2lTVDJeibc2yj2T6OKmx5dIw3UtMFBdUkhd9Q="}'
DEEP_HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"6HZ/FHOibbfr6FsGaArmXVwY1JEO+l2lTVDJeibc2yj2T6OKmx5dIw3UtMFBdUkhd9Q="}'
DEEPLINKS_HASURA_STORAGE_URL: http://deep-hasura-storage:8000/
HASURA_ENDPOINT: http://deep-hasura:8080/v1
DOCKER_DEEPLINKS_URL: http://deep-links:3006
MIGRATIONS_DEEPLINKS_URL: http://host.docker.internal:3006
HASURA_GRAPHQL_ADMIN_SECRET: e9cd987d6c7dd8206a34f7790fed2a29
MIGRATIONS_HASURA_SECRET: e9cd987d6c7dd8206a34f7790fed2a29
DEEPLINKS_HASURA_SECRET: e9cd987d6c7dd8206a34f7790fed2a29
POSTGRES_PASSWORD: d2ef4e87ecc262ff4615887006d8b7b4
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:d2ef4e87ecc262ff4615887006d8b7b4@deep-postgres:5432/postgres?sslmode=disable
POSTGRES_MIGRATIONS_SOURCE: postgres://postgres:[email protected]:5432/postgres?sslmode=disable
RESTORE_VOLUME_FROM_SNAPSHOT: 0
MANUAL_MIGRATIONS: 1
MINIO_ROOT_USER: ce790e9910e093881a2f88382ac18c47
MINIO_ROOT_PASSWORD: 01f99f6095777953c9470ddecfe45931
S3_ACCESS_KEY: ce790e9910e093881a2f88382ac18c47
S3_SECRET_KEY: 01f99f6095777953c9470ddecfe45931
DEEPLINKS_PORT: 3006
DEEPCASE_PORT: 3007
npm_config_yes: true
DEEP_HASURA_PORT: 8080
DEEP_HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:d2ef4e87ecc262ff4615887006d8b7b4@deep-postgres:5432/postgres?sslmode=disable
HASURA_GRAPHQL_ENABLE_CONSOLE: true
DEEP_HASURA_GRAPHQL_ENABLE_CONSOLE: true
HASURA_GRAPHQL_DEV_MODE: true
DEEP_HASURA_GRAPHQL_DEV_MODE: true
HASURA_GRAPHQL_LOG_LEVEL: debug
DEEP_HASURA_GRAPHQL_LOG_LEVEL: debug
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup,http-log,webhook-log,websocket-log,query-log
DEEP_HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup,http-log,webhook-log,websocket-log,query-log
DEEP_HASURA_GRAPHQL_ADMIN_SECRET: e9cd987d6c7dd8206a34f7790fed2a29
HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS: true
DEEP_HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS: true
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: undefined
DEEP_HASURA_GRAPHQL_UNAUTHORIZED_ROLE: undefined
DEEP_POSTGRES_PORT: 5432
POSTGRES_USER: postgres
DEEP_POSTGRES_USER: postgres
DEEP_POSTGRES_PASSWORD: d2ef4e87ecc262ff4615887006d8b7b4
PGGSSENCMODE: disable
DEEP_POSTGRES_GSS_ENCODING_MODE: disable
PGSSLMODE: disable
DEEP_POSTGRES_SSL_MODE: disable
PGREQUIRESSL: 0
DEEP_POSTGRES_REQUIRE_SSL: 0
DEEP_HASURA_STORAGE_PORT: 8000
DEEP_HASURA_STORAGE_HASURA_GRAPHQL_ADMIN_SECRET: e9cd987d6c7dd8206a34f7790fed2a29
HASURA_STORAGE_DEBUG: true
DEEP_HASURA_STORAGE_DEBUG: true
HASURA_METADATA: 1
DEEP_HASURA_STORAGE_HASURA_METADATA: 1
DEEP_HASURA_STORAGE_HASURA_ENDPOINT: http://deep-hasura:8080/v1
S3_ENDPOINT: http://deep-minio:9000
DEEP_HASURA_STORAGE_S3_ENDPOINT: http://deep-minio:9000
DEEP_HASURA_STORAGE_S3_ACCESS_KEY: ce790e9910e093881a2f88382ac18c47
DEEP_HASURA_STORAGE_S3_SECRET_KEY: 01f99f6095777953c9470ddecfe45931
S3_BUCKET: default
DEEP_HASURA_STORAGE_S3_BUCKET: default
S3_ROOT_FOLDER: default
DEEP_HASURA_STORAGE_S3_ROOT_FOLDER: default
POSTGRES_MIGRATIONS: 0
DEEP_HASURA_STORAGE_POSTGRES_MIGRATIONS: 0
DEEP_HASURA_STORAGE_POSTGRES_MIGRATIONS_SOURCE: postgres://postgres:d2ef4e87ecc262ff4615887006d8b7b4@deep-postgres:5432/postgres?sslmode=disable
DEEP_MINIO_PORT: 9000
DEEP_MINIO_CONSOLE_PORT: 32765
DEEP_MINIO_ROOT_USER: ce790e9910e093881a2f88382ac18c47
DEEP_MINIO_ROOT_PASSWORD: 01f99f6095777953c9470ddecfe45931
MIGRATIONS_ID_TYPE_SQL: bigint
MIGRATIONS_ID_TYPE_GQL: bigint
MIGRATIONS_SCHEMA: public
MIGRATIONS_RL_TABLE: rl_example__links__reserved
MIGRATIONS_DATE_TYPE_SQL: timestamp
RESERVED_LIFETIME_MS: 86400000
MIGRATIONS_DIR: /tmp/deep
MIGRATIONS_HASURA_PATH: localhost:8080
DEEPLINKS_HASURA_PATH: deep-hasura:8080
MIGRATIONS_HASURA_SSL: 0
DEEPLINKS_HASURA_SSL: 0
jobs:
dockerize:
name: dockerize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
- name: ci
run: npm ci
- name: build
run: npm run package:build
- name: docker-ver backup dir
run: mkdir backup
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: deepf/deeplinks
- name: build docker image for
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: docker init
run: docker compose -p deep up -d
- name: docker logs deep-links
run: docker logs deep-links
- name: migrate
run: npx -q wait-on --timeout 100000 http://localhost:3006/api/healthz && npm run migrate
- name: snapshot:create
run: 'npm run snapshot:create'
- name: docker-ver backup volume
run: docker run --rm --volumes-from deep-postgres -v $(pwd):/temp ubuntu tar -c -v -C /var/lib/postgresql -f /temp/backup/volume.tar ./data
- name: docker-ver backup migrations log
run: cp .migrate backup/.migrate
- name: Extract metadata (tags, labels) for Docker
id: meta_push
uses: docker/metadata-action@v3
with:
images: deepf/deeplinks
- name: build docker image and push
id: docker_build_push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta_push.outputs.tags }}
labels: ${{ steps.meta_push.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build_push.outputs.digest }}
- name: Collect Docker Logs
if: failure()
uses: jwalton/[email protected]
with:
dest: './logs'
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz