generated from edenia/full-stack-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 4
106 lines (98 loc) · 4.28 KB
/
push-prod-environment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build images from latest main branch
on:
push:
tags:
- v*
jobs:
create-main-image:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup Docker
uses: docker-practice/[email protected]
- name: Log in to docker registry
run: |
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login \
--username ${{ secrets.DOCKER_HUB_USER }} \
--password-stdin
- name: Build new images and push
run: |
make \
build-docker-images \
push-docker-images
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
# webapp
REACT_APP_VERSION: ${{ github.ref }}
REACT_APP_NAME: 'proton_affiliate'
REACT_APP_TITLE: 'Affiliate Account Referrals Program on Proton Blockchain'
REACT_APP_CHAIN_LOGO: 'https://earnproton.com/proton-logo.png'
REACT_APP_FOOTER_LINKS: '[]'
REACT_APP_UAL_APP_NAME: 'Proton Affiliate Program'
REACT_APP_UAL_API_PROTOCOL: 'https'
REACT_APP_UAL_API_HOST: ${{ secrets.REACT_APP_UAL_API_HOST }}
REACT_APP_UAL_API_PORT: '443'
REACT_APP_UAL_CHAIN_ID: '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0'
REACT_APP_HASURA_URL: https://graphql.earnproton.com/v1/graphql
REACT_APP_BLOCK_EXPLORER_URL: https://www.protonscan.io
REACT_APP_AFFILIATE_ACCOUNT: earnproton
REACT_APP_USE_TESTNET: false
- name: Build kubernetes files
id: build_kubernetes_files
run: |
make \
build-kubernetes
env:
# general
NAMESPACE: proton-affiliate
INGRESS_HOST: earnproton.com
INGRESS_GRAPHQL_HOST: graphql.earnproton.com
# postgres
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
# hapi
HAPI_SERVER_PORT: 9090
HAPI_SERVER_ADDRESS: 0.0.0.0
HAPI_NETWORK_API: ${{ secrets.HAPI_NETWORK_API }}
HAPI_NETWORK_CHAIN_ID: '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0'
HAPI_NETWORK_WALLET: ${{ secrets.HAPI_NETWORK_WALLET }}
HAPI_HASURA_URL: ${{ secrets.HAPI_HASURA_URL }}
HAPI_HASURA_ADMIN_SECRET: ${{ secrets.HAPI_HASURA_ADMIN_SECRET }}
HAPI_MAIL_HOST: ${{ secrets.HAPI_MAIL_HOST }}
HAPI_MAIL_PORT: ${{ secrets.HAPI_MAIL_PORT }}
HAPI_MAIL_USER: ${{ secrets.HAPI_MAIL_USER }}
HAPI_MAIL_PASSWORD: ${{ secrets.HAPI_MAIL_PASSWORD }}
HAPI_AFFILIATE_ACCOUNT: ${{ secrets.HAPI_AFFILIATE_ACCOUNT }}
HAPI_AFFILIATE_PASSWORD: ${{ secrets.HAPI_AFFILIATE_PASSWORD }}
HAPI_AFFILIATE_VERIFY_EXPIRED_INTERVAL: 3600
HAPI_AFFILIATE_CLEAR_REFERRALS_INTERVAL: 86400
HAPI_AFFILIATE_SET_RATE_INTERVAL: 86400
HAPI_AFFILIATE_UPDATE_KYC_INTERVAL: 18000
HAPI_AFFILIATE_UPDATE_REQUESTER_INTERVAL: 86400
HAPI_HYPERION_API: ${{ secrets.HAPI_HYPERION_API }}
HAPI_HYPERION_START_AT: '2021-06-02T00:00:00.000+00:00'
HAPI_EXCHANGE_API: 'https://api.coingecko.com/api/v3/simple/price?ids=(from)&vs_currencies=(to)'
# hasura
HASURA_GRAPHQL_ENABLE_CONSOLE: true
HASURA_GRAPHQL_DATABASE_URL: ${{ secrets.HASURA_GRAPHQL_DATABASE_URL }}
HASURA_GRAPHQL_ADMIN_SECRET: ${{ secrets.HASURA_GRAPHQL_ADMIN_SECRET }}
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: ${{ secrets.HASURA_GRAPHQL_UNAUTHORIZED_ROLE }}
HASURA_GRAPHQL_ACTION_BASE_URL: ${{ secrets.HASURA_GRAPHQL_ACTION_BASE_URL }}
- name: Deploy kubernetes files
uses: steebchen/[email protected]
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
NAMESPACE: proton-affiliate
K8S_BUILD_DIR: build_k8s
with:
args: version && make deploy-kubernetes
- name: Create Release
id: create_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false