Skip to content

Commit

Permalink
Docker and Functional Travis-CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLoneRonin committed Dec 31, 2020
1 parent 179c020 commit 9b79b31
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 16 deletions.
39 changes: 25 additions & 14 deletions .travis.yml
@@ -1,16 +1,27 @@
os: linux
dist: focal
language: erlang
addons:
apt:
packages:
- sqlite3
install:
- epmd -daemon

otp_release:
- 22.2
# blocklist
branches:
except:
- master
# AR UT
script:
- ./bin/test
- 23.0

jobs:
include:
- name: arweave-docker
services:
- docker
script:
- sudo apt-get update
- sudo apt-get install apt-utils build-essential g++ clang gcc -y
- docker build -t arweave .

- name: arweave-source
script:
- sudo apt-get update
- sudo apt-get install apt-utils build-essential g++ clang gcc -y
- sudo apt-get install erlang-dev -y
- sudo apt-get cmake make -y
- sudo apt-get libsqlite3-dev -y
- git submodule init
- git submodule update
- ./rebar3 as prod tar
26 changes: 26 additions & 0 deletions Dockerfile
@@ -0,0 +1,26 @@
FROM erlang:23.0

LABEL maintainer="Arweave Team <hello@arweave.org>"

ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /app
COPY . .

RUN apt-get update
RUN apt-get install apt-utils -y
RUN apt-get install build-essential -y
RUN apt-get install g++ clang gcc -y
RUN apt-get install git -y
RUN apt-get install cmake -y
RUN apt-get install make -y
RUN apt-get install libsqlite3-dev -y
RUN apt-get install erlang-dev -y

RUN git submodule init
RUN git submodule update

RUN ./rebar3 as prod tar
RUN ulimit -n 10240

CMD ["/bin/bash"]
24 changes: 24 additions & 0 deletions README.md
Expand Up @@ -34,6 +34,30 @@ $ ./rebar3 as prod tar

You will then find the gzipped tarball at `_build/prod/rel/arweave/arweave-x.y.z.tar.gz`.

## Build with Docker

As an alternative you can build the project with Docker. In order to compile the project, you will need to run.

```bash
docker build -t arweave .
```

After, you can then start a new Docker container. In order for Arweave to work, you **must** specify the `--network host` flag.

```bash
docker run --it --network host arweave
```

You can then start interacting with the project in both the production and development environments.

```bash
# For development
./bin/start-dev --help

# For production
./_build/prod/rel/arweave/bin/start --help
```

# Running a gateway

To run a gateway, consult the [gateway setup guide](doc/gateway_setup_guide.md).
Expand Down
1 change: 0 additions & 1 deletion apps/arweave/lib/RandomX
Submodule RandomX deleted from d64fce
2 changes: 1 addition & 1 deletion rebar.lock
Expand Up @@ -24,7 +24,7 @@
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.7.1">>},1},
{<<"rocksdb">>,
{git,"https://gitlab.com/arweave1/erlang-rocksdb.git",
{ref, "09ba3a9016528ae7466a824d04a3d6ff479537b1"}},
{ref,"09ba3a9016528ae7466a824d04a3d6ff479537b1"}},
0}]}.
[
{pkg_hash,[
Expand Down

0 comments on commit 9b79b31

Please sign in to comment.