-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Docker Compose Easy Setup (#250)
* Refactor: Docker Compose Easy Setup Signed-off-by: jay-dee7 <[email protected]> * Changed action to reflect the updates * Add: long-syntax for ports in docker-compose config Signed-off-by: jay-dee7 <[email protected]> * File structure and workflows * Switched permissions * Copy as root then own it * Added permissions * Created localnet setup extracted from workflow * Removed volume from Dockerfile * Switched directory to match changes * Fixed to match new image settings * External laddr availability * Switched test port to avoid clashes * Bypass defaults * Removed excess * Removed moniker name in container env vars Signed-off-by: jay-dee7 <[email protected]> * Fixed supervisor config to match dirs * Removed unwanted quotes * Switched to reflect main * Single Dockerfile for mainnet & testnet * Adjusted to old dir * Removed excess * Upgraded testnet version beforehand * Added whole home dir volume * Multiple driver options & fixes * Testnet ref typo fix * Consistent across mainnet & testnet * Moved environment variables to host * Move single image localnet to tests * Fix naming of build tools * Fx liinks in workflows * Move docker localnet to tests * Fix documentation * Fix case * Fix broken links * Allow 0, 403 status codes for link checker * Fix broken links * Fix file names * Fx links, dockerfile * Fix test pipeline * Fix test pipeline * Fix test * Revert volume names * Fix corner case where host ip is invalid at first launch * Optimize docker file * Corrected spelling in filename * Fix script name in the lint pipeline * Typo fixes in GitHub Actions release workflow * Cosmetic switch to put exposed ports in same order as in config files * Swapping parameter order around in node-runner.sh * Added explanatory comments to Docker Compose file * Added extended descriptions for inside-container configuration file for mainnet * Update Dockerfile * Modified configuration for volumes in Docker Compose file * Extended descriptions in host environment variables * Update .Dockerignore * Update release.yml * Update .gitignore * Changed node-runner script to copy genesis and seed config data from Docker Compose config locations * Optimise Dockerfile by removing unnecessary requirements - Removed unused apt-get install packages in Docker build stages - Added comments for readability * Fixed errors due to incorrect commenting style in Compose environment file * Fixed incorrect variable names in Docker Compose file * Updated Docker Compose files and moved directories * Changed host and container environment files * Update node-runner.sh * Bumped version to v0.3.5 * Updated Dockerfile release compose * Moved production build stage to separate file * Renaming host.env to docker-compose.env * Renaming node-runner.sh to entrypoint.sh * Added build stage to Docker Compose file * Created separate stage Dockerfile for cheqd-node release images * Fix container's parameters Signed-off-by: Andrew Nikitin <[email protected]> * Fix cheqd-node image building Signed-off-by: Andrew Nikitin <[email protected]> * Rename job name Signed-off-by: Andrew Nikitin <[email protected]> * Fix yaml errors Signed-off-by: Andrew Nikitin <[email protected]> * Change Dockerfile to multi-stage build * Made build environment variable optional * Commented out build section in Docker Compose file * Delete Dockerfile.release * Debugging docker-compose Co-authored-by: Andrew Nikitin <[email protected]> * Debugging docker-compose * Fix image building * Change entrypoint for cheqd_noded_docker cmd Signed-off-by: Andrew Nikitin <[email protected]> * Make 77 for all dirs Signed-off-by: Andrew Nikitin <[email protected]> * Add UID and GID for image buildingI Signed-off-by: Andrew Nikitin <[email protected]> * Change params passing for UID and GID Signed-off-by: Andrew Nikitin <[email protected]> * Debug Signed-off-by: Andrew Nikitin <[email protected]> * Change entrypoints for tests Signed-off-by: Andrew Nikitin <[email protected]> * Update Dockerfile * Update docker-compose.yml * Revert "Update docker-compose.yml" This reverts commit d727e9d. Co-authored-by: Tasos <[email protected]> Co-authored-by: Alexandr Kolesov <[email protected]> Co-authored-by: Ankur Banerjee <[email protected]> Co-authored-by: Andrew Nikitin <[email protected]> Signed-off-by: Andrew Nikitin <[email protected]>
- Loading branch information
1 parent
68ddd2b
commit b3a6eee
Showing
39 changed files
with
479 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
ci | ||
.devcontainer | ||
### APP-SPECIFIC | ||
.github | ||
*.md | ||
build-tools/* | ||
docs/* | ||
architecture/* | ||
persistent_chains/* | ||
|
||
|
||
### GENERAL EXCLUSIONS ### | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# IDE Exclusions | ||
.devcontainer | ||
.vscode | ||
.vscode-upload.json | ||
.idea | ||
vue/node_modules | ||
vue/src/store/generated | ||
vue/dist | ||
secret.yml | ||
|
||
# Python | ||
.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Ensures that all bash scripts in the repository use `set -euox pipefail` or `set -euo pipefail` statement at the beginning. | ||
|
||
set -euo pipefail | ||
|
||
INVALID_FILES_FOUND=0 | ||
|
||
for BASH_SCRIPT in $(find . -type f -name "*.sh") | ||
do | ||
if ( ! grep -q "set -euo pipefail" "${BASH_SCRIPT}" ) && ( ! grep -q "set -euox pipefail" "${BASH_SCRIPT}" ) | ||
then | ||
echo "${BASH_SCRIPT}" | ||
INVALID_FILES_FOUND=1 | ||
fi | ||
done | ||
|
||
if [[ INVALID_FILES_FOUND -eq 1 ]] | ||
then | ||
echo "" | ||
echo "The bash scripts above must include either 'set -euo pipefail' or 'set -euox pipefail." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Lint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
|
||
# We can't use VALIDATE_GO from super linter because of this issue: | ||
# https://github.com/github/super-linter/issues/143 | ||
go-lint: | ||
name: Lint go | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.43.0 | ||
args: --timeout 5m0s | ||
|
||
md-link-check: | ||
name: Check markdown links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check if Markdown links are valid | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
config-file: '.github/linters/mlc_config.json' | ||
folder-path: "." | ||
|
||
sh-euox-pipefail-check: | ||
name: Check for 'set -euox pipefail' in shell scripts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check that all shell scripts use 'set -euox pipefail' | ||
run: bash .github/scripts/ensure_set_euox_pipefail.sh | ||
|
||
super-lint: | ||
name: Run super linter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Super-Linter | ||
uses: github/super-linter/slim@v4 | ||
env: | ||
VALIDATE_MARKDOWN: true | ||
VALIDATE_XML: true | ||
VALIDATE_YAML: true | ||
VALIDATE_OPENAPI: true | ||
|
||
VALIDATE_ALL_CODEBASE: true | ||
LOG_LEVEL: WARN | ||
|
||
DEFAULT_BRANCH: main | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"aliveStatusCodes": [200, 206, 999] | ||
} | ||
"aliveStatusCodes": [0, 200, 206, 403, 999] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
CHEQD_USER_NAME=cheqd | ||
|
||
|
File renamed without changes.
Oops, something went wrong.