Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tr.json #109

Open
wants to merge 183 commits into
base: jp-translation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
8d0a03d
French translations
alexouille123 Feb 28, 2021
57a652a
Bump urijs from 1.19.5 to 1.19.6
dependabot[bot] Mar 1, 2021
b4034d5
Small changes
alexouille123 Mar 3, 2021
d3a805b
Create ch-tw.json
efishdew Mar 4, 2021
f34e421
Create ur.json
mubashirsiddique Mar 7, 2021
80cc460
Bump elliptic from 6.5.3 to 6.5.4
dependabot[bot] Mar 8, 2021
001e308
Merge pull request #235 from alexouille123/patch-1
chatch Mar 12, 2021
5e6b381
Merge pull request #236 from chatch/dependabot/npm_and_yarn/urijs-1.19.6
chatch Mar 12, 2021
d0e0195
Merge pull request #240 from efishdew/patch-2
chatch Mar 12, 2021
ff8f61e
Bump react-dev-utils from 4.2.3 to 11.0.4
dependabot[bot] Mar 12, 2021
6525937
Merge pull request #241 from mubashirsiddique/patch-1
chatch Mar 12, 2021
473b262
Merge pull request #242 from chatch/dependabot/npm_and_yarn/elliptic-…
chatch Mar 12, 2021
c4fdd3b
Merge pull request #246 from chatch/dependabot/npm_and_yarn/react-dev…
chatch Mar 12, 2021
ec168d1
update issue_template.md with more obvious message
chatch Mar 13, 2021
cf1115e
revert dependabot dependency upgrade which breaks the build - react v…
chatch Mar 13, 2021
dd11419
Merge pull request #249 from chatch/jp-translation
chatch Mar 13, 2021
ced54cf
Merge branch 'master' of github.com:chatch/stellarexplorer
chatch Mar 13, 2021
c828d24
support new languages Japanese, Urdu, French and split Chinese into z…
chatch Mar 13, 2021
b33ecbb
remove language zh as we now have zh-Hans and zh-Hant
chatch Mar 13, 2021
ff54e6c
restore package dependencies to the last commit where the tests and b…
chatch Mar 13, 2021
e5bbb15
Added Hindi translation
aanupam23 Mar 14, 2021
ef9fc5c
Merge pull request #250 from aanupam23/master
chatch Mar 21, 2021
a47f7a9
Hook up new हिन्दी translation
chatch Mar 21, 2021
e8a2e10
1.2.0
chatch Mar 21, 2021
62a00b0
Indonesia language
ronnyfahrudin Apr 12, 2021
74cb290
Merge pull request #256 from ronnyfahrudin/patch-1
chatch Apr 25, 2021
523adae
connect Bahasa Indonesia translation to the UI
chatch Apr 25, 2021
4c07520
bump to 1.3.0
chatch Apr 25, 2021
8174546
switch to cloudflare analytics
chatch Jul 11, 2021
a9c58fc
disable data refresh on home page - wasted data / very few users watc…
chatch Jul 11, 2021
a828cc4
support muxed accounts - show muxed account in payment operations
chatch Jul 15, 2021
86702ed
rename isStellarAddress to isFederatedAddress
chatch Jul 15, 2021
fe3494f
support /account/<muxed address>
chatch Jul 15, 2021
8ab04ef
update README with multiplexed endpoints
chatch Jul 15, 2021
a9b8f85
change format of muxed accounts to '<muxed> [base]'
chatch Jul 26, 2021
d868b66
Merge pull request #314 from chatch/muxed-accounts
chatch Jul 26, 2021
9286b88
migrate from travis org to travis com
chatch Jul 26, 2021
c1ebe77
1.4.0
chatch Jul 26, 2021
97bc189
change currency to test-π
dev-king21 Sep 27, 2021
20f5631
Merge branch 'currency' into 'master'
kokkalis Sep 27, 2021
6362143
Uifix
dev-king21 Sep 27, 2021
e485b9a
Merge branch 'uifix' into 'master'
dev-king21 Sep 27, 2021
5d964fc
network selector
dev-king21 Sep 27, 2021
b36b597
Merge branch 'networkselector' into 'master'
dev-king21 Sep 27, 2021
69a9f0d
change ledger to block
dev-king21 Sep 27, 2021
c2b80a0
Merge branch 'block' into 'master'
dev-king21 Sep 27, 2021
9ec276a
Add kubernetes configuration
hugo-alayrangues Sep 28, 2021
5d6f722
make Dockerfile and nginx-defaults.conf
dev-king21 Sep 29, 2021
a925f7a
Add kubernetes configuration and Dockerfile
hugo-alayrangues Sep 30, 2021
4037e53
Merge branch 'kubernetes_configuration' into 'development'
dev-king21 Sep 30, 2021
ec35a90
Merge branch 'development' into kubernetes_configuration
dev-king21 Sep 30, 2021
14ea285
Merge branch 'development' into 'staging'
hugo-alayrangues Sep 30, 2021
ae72222
remove unnecessary pages
dev-king21 Oct 1, 2021
f96e88b
Merge branch 'feature/remove-unnecessary-pages' into 'development'
dev-king21 Oct 1, 2021
ccffa09
Merge branch 'development' into 'staging'
dev-king21 Oct 1, 2021
5c6ce37
change search modal
dev-king21 Oct 3, 2021
e7d90e2
Remove Anchor/
dev-king21 Oct 3, 2021
7212a68
remove more dropdown
dev-king21 Oct 3, 2021
8e495f2
Merge branch 'feature/remove-more-page' into 'development'
dev-king21 Oct 4, 2021
72de21f
change test button
dev-king21 Oct 4, 2021
a40a5dd
Replace operations to payment
dev-king21 Oct 4, 2021
b725d44
revert ur.json
dev-king21 Oct 4, 2021
b6d0bef
Merge branch 'change_test_button' into 'development'
dev-king21 Oct 4, 2021
20429d9
Merge branch 'development' into 'staging'
dev-king21 Oct 4, 2021
689846a
remove asset field on search modal
dev-king21 Oct 4, 2021
a42f2bb
Merge branch 'search_modal' of gitlab.com:pi-network/dev/apps/blockex…
dev-king21 Oct 4, 2021
ca98a1a
Merge branch 'search_modal' into 'development'
dev-king21 Oct 4, 2021
9dc63e2
Merge branch 'development' into 'staging'
dev-king21 Oct 4, 2021
033fb28
remove json button for mobile
dev-king21 Oct 4, 2021
971a8e0
Merge branch 'fix_issues' of gitlab.com:pi-network/dev/apps/blockexpl…
dev-king21 Oct 4, 2021
f79f6ba
leave json, remove transaction and Type for mobile
dev-king21 Oct 4, 2021
020c155
change block-json class to block-column
dev-king21 Oct 4, 2021
f30c939
Merge branch 'fix_issues' into 'development'
dev-king21 Oct 4, 2021
34b6014
change title and footer
dev-king21 Oct 5, 2021
134d0d1
Merge branch 'footer_title' into 'development'
dev-king21 Oct 5, 2021
b95487f
Merge branch 'development' into 'staging'
dev-king21 Oct 5, 2021
1875f6b
fix title
dev-king21 Oct 5, 2021
0568b75
Merge branch 'fix_title' into 'development'
dev-king21 Oct 5, 2021
0f26430
Merge branch 'development' into 'staging'
dev-king21 Oct 5, 2021
4fc5882
fix header to pi blockexplorer
dev-king21 Oct 5, 2021
db4c150
Merge branch 'fix_header' into 'development'
dev-king21 Oct 5, 2021
22c0c50
Merge branch 'development' into 'staging'
dev-king21 Oct 5, 2021
c27e23a
update dockerfile
dev-king21 Oct 6, 2021
c0dcbf3
Merge branch 'update_dockerfile' into 'development'
dev-king21 Oct 6, 2021
386999f
Merge branch 'development' into 'staging'
dev-king21 Oct 6, 2021
29069c7
Rebrand blockexplorer site
Oct 6, 2021
467e11f
csv change
Oct 6, 2021
db37048
Merge branch 'ui-theme-change' into 'development'
dev-king21 Oct 7, 2021
d0a3606
change color of # content
dev-king21 Oct 7, 2021
4fe4d12
Merge branch 'change_table_color' into 'development'
dev-king21 Oct 7, 2021
a3813d0
change stroops and remove json button
dev-king21 Oct 7, 2021
e77c8f0
fix 0.0.1 to 0.01
dev-king21 Oct 7, 2021
74b19b2
Merge branch 'stroops_json_button' into 'development'
dev-king21 Oct 7, 2021
eb839a0
redirect on time column and change stellar to pi
dev-king21 Oct 7, 2021
b56b2f5
Merge branch 'time_redirect_stellar_change' into 'development'
dev-king21 Oct 7, 2021
841d353
Merge branch 'development' into 'staging'
dev-king21 Oct 7, 2021
64eed52
change favicon and title
dev-king21 Oct 7, 2021
f98c3a2
Merge branch 'change_favicon' into 'development'
dev-king21 Oct 7, 2021
372d828
Merge branch 'development' into 'staging'
dev-king21 Oct 7, 2021
9c71202
Clean up Readme, Footer, and Github links
kokkalis Oct 8, 2021
edf6ad4
Fixed broken link. Blocks not ledgers.
kokkalis Oct 8, 2021
ded15e3
Merge branch 'development' into 'staging'
Oct 8, 2021
28f3505
change link color, fix fee, update package.json and change base fee o…
dev-king21 Oct 8, 2021
8f7eb78
Merge branch 'link_color_fee' into 'development'
dev-king21 Oct 8, 2021
56d6a73
merged changes to staging
dev-king21 Oct 8, 2021
5c32f27
Merge branch 'development' into 'staging'
dev-king21 Oct 8, 2021
abf6441
First merge from staging to production
dev-king21 Oct 8, 2021
81c4a6f
Merge branch 'staging' into 'production'
dev-king21 Oct 8, 2021
1c5da96
Fix homepage URL in package.json
aurelienshz Oct 12, 2021
0948977
Merge branch 'fix/homepage-url' into 'development'
Oct 12, 2021
f97a319
Merge branch 'development' into 'staging'
Oct 12, 2021
917347a
homepage URL in package.json: Force git to take the change into account
aurelienshz Oct 12, 2021
504f454
Merge branch 'fix/homepage-url' into 'development'
Oct 12, 2021
ed4ebf6
Merge branch 'development' into staging
aurelienshz Oct 12, 2021
ec4fcd2
Nginx rewrite /blockexplorer to /
aurelienshz Oct 12, 2021
1c87fca
Merge branch 'fix/nginx-rewrite' into 'development'
Oct 12, 2021
c885447
Merge branch 'development' into 'staging'
Oct 12, 2021
e795bb7
basename fix attempt 2/?
aurelienshz Oct 12, 2021
0d46712
Merge branch 'fix/basename' into 'development'
Oct 12, 2021
16c6833
Merge branch 'development' into 'staging'
Oct 12, 2021
44c6fd6
Fix attempt 3/?
aurelienshz Oct 12, 2021
bc2d848
Merge branch 'fix/basename-2' into 'development'
Oct 12, 2021
4a0f7e8
Merge branch 'development' into 'staging'
Oct 12, 2021
a9918b3
Fix basename 4/?
aurelienshz Oct 12, 2021
936a730
Merge branch 'fix/basename-4' into 'development'
Oct 12, 2021
9235fc2
Merge branch 'development' into 'staging'
Oct 12, 2021
df788cc
Merge branch 'staging' into production
aurelienshz Oct 12, 2021
95d81df
Unregister service worker
aurelienshz Oct 13, 2021
6d6fca8
Merge branch 'unregister-service-worker' into 'development'
Oct 13, 2021
c9b5cca
Merge branch 'development' into 'staging'
Oct 13, 2021
253205f
Merge branch 'staging' into 'production'
Oct 13, 2021
92fcb40
Adding Italian translations
ugochimobi Oct 13, 2021
7175239
update manifest.json, search and sitemap xml files
vlad Oct 13, 2021
ea802e8
chage image size on search.xml
vlad Oct 13, 2021
334cced
Create hau.json
bngone Oct 13, 2021
c3f559a
fix default language
vlad Oct 18, 2021
17ef016
Merge branch 'default-language' into 'development'
dev-king21 Oct 18, 2021
dfa118f
Merge branch 'development' into 'staging'
dev-king21 Oct 18, 2021
5246736
Merge branch 'staging' into 'production'
dev-king21 Oct 18, 2021
667836c
fix csv button, add json button and change color of user address
vlad Oct 18, 2021
f047065
fix redirect on payment page
vlad Oct 18, 2021
4ec7286
Merge branch 'csv-json-address' into 'development'
dev-king21 Oct 19, 2021
7abc52b
Merge branch 'development' into 'staging'
dev-king21 Oct 19, 2021
6373778
Merge branch 'staging' into 'production'
dev-king21 Oct 19, 2021
8e5c774
Change steexp images to pi images
Oct 19, 2021
4087b97
Logo update
Oct 20, 2021
065af2a
change logo to yellow
Oct 21, 2021
6a60010
Fix infinite loop on iOS
aurelienshz Oct 21, 2021
dcfc217
Merge branch 'fix/browser-infinite-loop' into 'development'
Oct 21, 2021
dc3950e
Merge branch 'development' into 'staging'
Oct 21, 2021
1f4b0b7
Merge branch 'staging' into 'production'
Oct 21, 2021
d6f7e6e
update comment
aurelienshz Oct 21, 2021
2bf8ba3
Merge branch 'update_xml' into 'development'
dev-king21 Oct 22, 2021
0fd1e55
Merge branch 'ui-change-image' into 'development'
dev-king21 Oct 22, 2021
e68fb36
Merge branch 'development' into 'staging'
dev-king21 Oct 22, 2021
fab9917
revert index.js
vlad Oct 22, 2021
820a357
comment unregister lines
vlad Oct 22, 2021
44ccc6c
Merge branch 'revert-index' into 'development'
dev-king21 Oct 22, 2021
a38ea58
Merge branch 'development' into 'staging'
dev-king21 Oct 22, 2021
690a4c0
Merge branch 'staging' into 'production'
dev-king21 Oct 25, 2021
29aa45f
update manifest 'steexp' to 'block explorer'
vlad Oct 25, 2021
b66bc61
Merge branch 'update-manifest' into 'development'
dev-king21 Oct 25, 2021
288b565
Merge branch 'fix/browser-infinite-loop' into 'development'
Oct 26, 2021
6fd0201
Nepali Translation added
imxitiz Nov 2, 2021
2576e11
Create pt.json
InsaneCrazythc Nov 21, 2021
daefd3d
Merge branch 'development' of https://github.com/pi-apps/pi-explorer …
vlad Nov 30, 2021
c8626c9
Merge pull request #4 from bngone/patch-3
dev-king21 Nov 30, 2021
8848c85
add hausa translation
vlad Dec 1, 2021
41dd48c
Merge pull request #11 from pi-apps/hausa-translation
dev-king21 Dec 1, 2021
c103162
Merge branch 'development' of gitlab.com:pi-network/live/apps/blockex…
vlad Dec 1, 2021
da9087c
Merge pull request #3 from ugochimobi/patch-1
dev-king21 Dec 1, 2021
e591c05
Merge branch 'development' of github.com:pi-apps/pi-explorer into ita…
vlad Dec 1, 2021
5832be5
add italian and translate it
vlad Dec 1, 2021
2199c34
Merge branch 'italian-translation' into 'development'
dev-king21 Dec 2, 2021
860b77d
Merge pull request #7 from Kshitiz2/development
dev-king21 Dec 2, 2021
34950c9
add nepali and fix italian
vlad Dec 2, 2021
a229983
Merge branch 'nepali-translation' into 'development'
dev-king21 Dec 2, 2021
4172665
Merge pull request #9 from InsaneCrazythc/patch-1
dev-king21 Dec 2, 2021
a57bcfa
add portuguese
vlad Dec 2, 2021
ad35de7
Merge branch 'portuguese-translation' into 'development'
dev-king21 Dec 2, 2021
d420682
Update README.md
kokkalis Dec 18, 2021
5ba1606
Create tr.json
Relaxx42 Dec 13, 2023
026ba15
Add files via upload
Relaxx42 Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
### Please NOTE the following before creating an issue:

* stellarexplorer ([steexp.com](https://steexp.com)) is a readonly view of the Stellar ledger so we can't help retrieve lost funds
* if your having trouble locating funds sent to an exchange (eg. Binance), contact the exchange directly
* if you entered an incorrect memo or forgot to enter your memo, we unfortunately can't help. contact the recipient and tell them your sending address
WE CAN'T HELP WITH FUNDS NOT RECEIVED, DELAYED OR WRONG MEMOS - CONTACT THE EXCHANGE OR THE RECEIPIENT IN THESE CASES - Stellar Explorer IS JUST A READ ONLY VIEW OF THE LEDGER

If your issue is with steexp.com itself or you have any suggestion or comment please enter the details below. Thank you!

Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
dist: trusty
language: node_js
node_js:
- lts/*
- node
- 14
cache:
directories:
- node_modules
Expand Down
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Source: https://typeofnan.dev/how-to-serve-a-react-app-with-nginx-in-docker/
# Multi-stage
# 1) Node image for building app assets
# 2) nginx stage to serve app assets

FROM node:13-alpine AS base

# Set working directory
WORKDIR /home/app

# Copy our node modules specification
COPY ./package.json .
COPY ./package-lock.json .

# Install node modules and build assets
RUN npm install

#Copy all files from current directory to working dir in image
COPY . .

# Create a build of the app
RUN npm run build

# nginx state for serving content
FROM nginx:alpine

EXPOSE 80

# Set working directory to nginx asset directory
WORKDIR /usr/share/nginx/html

# Remove default nginx static assets
RUN rm -rf ./*

# Copy static assets from builder stage
COPY --from=base /home/app/build .

COPY ./docker/nginx-defaults.conf /etc/nginx/conf.d/default.conf

# Containers run nginx with global directives and daemon off
ENTRYPOINT ["nginx", "-g", "daemon off;"]
86 changes: 10 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,13 @@
# Stellar Explorer

[![Build Status](https://travis-ci.org/chatch/stellarexplorer.svg?branch=master)](https://travis-ci.org/chatch/stellarexplorer)

A ledger explorer for [Stellar](https://stellar.org).

Public: https://steexp.com
Test: https://testnet.steexp.com
Local: http://localhost:3000

## Resources

### Lists

| Resource | URI |
| ------------ | -------------------------------------------- |
| Operations | [/operations](https://steexp.com/operations) |
| Transactions | [/txs](https://steexp.com/txs) |
| Ledgers | [/ledgers](https://steexp.com/ledgers) |
| Payments | [/payments](https://steexp.com/payments) |
| Trades | [/trades](https://steexp.com/trades) |
| Effects | [/effects](https://steexp.com/effects) |

### Directory

| Resource | URI |
| --------- | ------------------------------------------ |
| Assets | [/assets](https://steexp.com/assets) |
| Anchors | [/anchors](https://steexp.com/anchors) |
| Exchanges | [/exchanges](https://steexp.com/exchanges) |

### Accounts

| Resource | URI |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| by Federated address | [/account/stellar\*fed.network](https://steexp.com/account/stellar*fed.network) |
| by Public address | [/account/GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX](https://steexp.com/account/GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX) |

#### Tabs

| Resource | URI |
| ---------------- | --------------------------------------------------------------------------------------------------------- |
| Balances Tab | [/account/stellar\*fed.network#balances](https://steexp.com/account/stellar*fed.network#balances) |
| Payments Tab | [/account/stellar\*fed.network#payments](https://steexp.com/account/stellar*fed.network#payments) |
| Offers Tab | [/account/stellar\*fed.network#offers](https://steexp.com/account/stellar*fed.network#offers) |
| Trades Tab | [/account/stellar\*fed.network#trades](https://steexp.com/account/stellar*fed.network#trades) |
| Effects Tab | [/account/stellar\*fed.network#effects](https://steexp.com/account/stellar*fed.network#effects) |
| Operations Tab | [/account/stellar\*fed.network#operations](https://steexp.com/account/stellar*fed.network#operations) |
| Transactions Tab | [/account/stellar\*fed.network#transactions](https://steexp.com/account/stellar*fed.network#transactions) |
| Signing Tab | [/account/stellar\*fed.network#signing](https://steexp.com/account/stellar*fed.network#signing) |
| Flags Tab | [/account/stellar\*fed.network#flags](https://steexp.com/account/stellar*fed.network#flags) |
| Data Tab | [/account/stellar\*fed.network#data](https://steexpcom/account/stellar*fed.network#data) |

### Search

| Resource | URI |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Federated address | [/search/steexp\*fed.network](https://steexp.com/search/steexp*fed.network) |
| Public address | [/search/GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX](https://steexp.com/search/GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX) |
| Ledger | [/search/10000000](https://steexp.com/search/10000000) |
| Transaction | [/search/26a568681712a44a515b2c90dcfaadb3ed2c40dc60254638407937bee4767071](https://steexp.com/search/26a568681712a44a515b2c90dcfaadb3ed2c40dc60254638407937bee4767071) |
| Asset Code | [/search/NGN](https://steexp.com/search/NGN) |
| Anchor Name | [/search/ripplefox](https://steexp.com/search/ripplefox) |
| Anchor Name (Partial) | [/search/fox](https://steexp.com/search/fox) |

### Misc

| Resource | URI |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Transaction | [/tx/26a568681712a44a515b2c90dcfaadb3ed2c40dc60254638407937bee4767071](https://steexp.com/tx/26a568681712a44a515b2c90dcfaadb3ed2c40dc60254638407937bee4767071) |
| Ledger | [/ledger/10000000](https://steexp.com/ledger/10000000) |
| Anchor | [/anchor/apay.io](https://steexp.com/anchor/apay.io) |
| Asset | [/asset/NGN](https://steexp.com/asset/NGN) |
# Pi Explorer

A block explorer for the [Pi Blockchain](https://minepi.com) based on Chris Hatch' repository.

To use it, visit the Pi App [pi://blockchain.pi](pi://blockchain.pi) on the [Pi Browser](https://developers.minepi.com) or visit https://minepi.com/blockexplorer


## Exploring Private / Local Development Networks<a name="private-networks"></a>

steexp will connect to a local horizon instance at http://localhost:8000 by default. If your running a local private network for development this is quite handy for browsing your changes to the ledger.
It connects to a local horizon instance at http://localhost:8000 by default. If you are running a local private network for development this is quite handy for browsing your changes to the ledger.

Alternatively you can run locally connecting to the testnet or public network horizon instances. To do this define these aliases to localhost:

Expand Down Expand Up @@ -112,6 +45,7 @@ npm i && npm run build
Use the language selector in the top right corner to change the language.

Translation files are here:
https://github.com/chatch/stellarexplorer/tree/master/src/languages
https://github.com/pi-apps/pi-explorer/tree/master/src/languages

Submit pull requests with new languages or languages fixes if you like.

Submit pull requests with new languages or languages fixes there.
27 changes: 27 additions & 0 deletions docker/nginx-defaults.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;

#access_log /var/log/nginx/host.access.log main;

location /blockexplorer {
alias /usr/share/nginx/html;

# First attempt to serve the requested file, then fall back to index.html, which loads the React app.
try_files $uri /blockexplorer/index.html;

location ~ ^.+\.(html?)$ {
add_header Cache-Control "public, max-age=300";
}
}

# error_page 404 /index.html;

# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
67 changes: 67 additions & 0 deletions kubernetes/config/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: blockexplorer-app-deployment
annotations:
app.gitlab.com/app: "__CI_PROJECT_PATH_SLUG__"
app.gitlab.com/env: "__CI_ENVIRONMENT_SLUG__"
labels:
app: blockexplorer-app
spec:
selector:
matchLabels:
app: blockexplorer-app
template:
metadata:
annotations:
app.gitlab.com/app: "__CI_PROJECT_PATH_SLUG__"
app.gitlab.com/env: "__CI_ENVIRONMENT_SLUG__"
labels:
app: blockexplorer-app
spec:
containers:
- name: blockexplorer-app
image: __APP_IMAGE_TAG__
ports:
- containerPort: 80
resources:
requests:
cpu: __APP_POD_CPU_LIMIT__
ephemeral-storage: __APP_POD_EPHEMERAL_STORAGE_LIMIT__
memory: __APP_POD_MEMORY_LIMIT__
imagePullSecrets:
- name: gitlab-registry
---
apiVersion: v1
kind: Service
metadata:
name: blockexplorer-app-service
spec:
selector:
app: blockexplorer-app
type: LoadBalancer
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: blockexplorer-app-deployment-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: blockexplorer-app-deployment
minReplicas: __APP_MIN_REPLICA__
maxReplicas: __APP_MAX_REPLICA__
metrics:
- resource:
name: memory
targetAverageUtilization: 80
type: Resource
- resource:
name: cpu
targetAverageUtilization: 80
type: Resource
35 changes: 35 additions & 0 deletions kubernetes/scripts/deploy_kubernetes_components
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# All the variables ($VARIABLE) are Gitlab pipeline variables
# They are set at different places:
# - $CI and $GITLAB ones are set by Gitlab
# - $IMAGE_TAG is set in the gitlab-ci.yml file

# Creates a kubernetes secret file
kubectl create secret docker-registry gitlab-registry \
--docker-server="$CI_REGISTRY" \
--docker-username="$CI_DEPLOY_USER" \
--docker-password="$CI_DEPLOY_PASSWORD" \
--docker-email="$GITLAB_USER_EMAIL" \
-o yaml --dry-run=client | kubectl apply -f -


# Replaces variables in the configuration file by their actual value
# Details: sed -ri "s|xxx|yyy|g" file
# - 'xxx' is what we want to replace
# - 'yyy' is what we want to put in place of 'xxx'
# - 'file' is the file in which we want to make this replacement
sed -ri \
-e "s|__CI_PROJECT_PATH_SLUG__|$CI_PROJECT_PATH_SLUG|g" \
-e "s|__CI_ENVIRONMENT_SLUG__|$CI_ENVIRONMENT_SLUG|g" \
-e "s|__APP_IMAGE_TAG__|$APP_IMAGE_TAG|g" \
-e "s|__APP_POD_CPU_LIMIT__|$APP_POD_CPU_LIMIT|g" \
-e "s|__APP_POD_EPHEMERAL_STORAGE_LIMIT__|$APP_POD_EPHEMERAL_STORAGE_LIMIT|g" \
-e "s|__APP_POD_MEMORY_LIMIT__|$APP_POD_MEMORY_LIMIT|g" \
-e "s|__APP_MIN_REPLICA__|$APP_MIN_REPLICA|g" \
-e "s|__APP_MAX_REPLICA__|$APP_MAX_REPLICA|g" \
./kubernetes/config/app.yaml


# Applies the configuration file to deploy the app
kubectl apply -f ./kubernetes/config/app.yaml
Loading