--- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,9 @@ RUN git clone https://github.com/usetech-llc/nft_parachain WORKDIR /nft_parachain RUN cargo build -RUN cargo test --all \ No newline at end of file +RUN cargo test --all + +# Copy and run start script +COPY ["./run.sh", "./run.sh"] +RUN chmod +x ./run.sh +CMD ["bash", "-c", "./run.sh"] --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,9 +9,4 @@ context: ./ dockerfile: Dockerfile volumes: - - chain-data:/chain-data/ - command: - cargo run -- --dev --ws-external --rpc-external --base-path=./chain-data - -volumes: - chain-data: \ No newline at end of file + - ./chain-data:/chain-data --- /dev/null +++ b/run.sh @@ -0,0 +1 @@ +cargo run -- --dev --ws-external --rpc-external --base-path=./chain-data \ No newline at end of file