Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .dclintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://github.com/zavoloklom/docker-compose-linter?tab=readme-ov-file#example-configuration-file
# rules: Customize which rules to apply and their severity levels (0 - Disabled, 1 - Warning, 2 - Error)
rules:
services-alphabetical-order: 0
service-image-require-explicit-tag: 0
quiet: false
debug: true
15 changes: 15 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Lint Docker Compose

on:
pull_request:
workflow_dispatch:

jobs:
dclint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: docker-compose-linter/dclint-github-action@18659f6a7956706cb67cf9c1ad5e55f4352cbc17 # 1.6.0
with:
path: ./docker/docker-compose.yml
recursive: true
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ STRESS_TIMEOUT ?= 120

# Create the chainstate dir and extract an archive to it when the "up" target is used
$(CHAINSTATE_DIR): /usr/bin/tar /usr/bin/zstd
@mkdir -p $(CHAINSTATE_DIR)
@if [ "$(TARGET)" = "up" ]; then
if [ -f "$(CHAINSTATE_ARCHIVE)" ]; then
sudo tar --same-owner -xf $(CHAINSTATE_ARCHIVE) -C $(CHAINSTATE_DIR) || exit 1
else
@echo "Chainstate archive ($(CHAINSTATE_ARCHIVE)) not found. Exiting"
rm -rf $(CHAINSTATE_DIR)
exit 1
@if [ ! -d "$(CHAINSTATE_DIR)" ]; then \
mkdir -p $(CHAINSTATE_DIR)
@if [ "$(TARGET)" = "up" ]; then
if [ -f "$(CHAINSTATE_ARCHIVE)" ]; then
sudo tar --same-owner -xf $(CHAINSTATE_ARCHIVE) -C $(CHAINSTATE_DIR) || exit 1
else
@echo "Chainstate archive ($(CHAINSTATE_ARCHIVE)) not found. Exiting"
rm -rf $(CHAINSTATE_DIR)
exit 1
fi
fi
fi

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ To override the archive used to restore the network:
```sh
CHAINSTATE_ARCHIVE=./docker/chainsate_new.tar.zstd make up
```
To override the chainstate dir and resume a stopped network:
*Note*: will not work for the `genesis` chainstate dir and absolute path is required
```sh
CHAINSTATE_DIR=$(pwd)/docker/chainsate/<existing chainstate dir> make up
```

### Start network from genesis
Creates a static chainstate folder at `./docker/chainstate/genesis`
Expand Down
Loading