Skip to content

Commit 78b9edd

Browse files
Todmysamuveth
andauthored
feat(ci/cd): add docker container (snapshot-labs#3915)
* feat(ci/cd): add docker container * fix: add empty line * fix(.dockerignore): add empty line * fix(Dockerfile): minor fixes --------- Co-authored-by: Sam <[email protected]>
1 parent 4e8b02a commit 78b9edd

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:18-alpine
2+
3+
RUN apk update && apk upgrade && \
4+
apk add --no-cache git py3-pip python3 gcc g++ make
5+
6+
WORKDIR /app
7+
8+
COPY . .
9+
10+
RUN yarn install --frozen-lockfile
11+
RUN yarn install --frozen-lockfile
12+
13+
RUN yarn run build
14+
15+
EXPOSE 8080
16+
17+
CMD ["yarn", "run", "dev", "--host"]

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ Use `http://localhost:8080/#/fabien.eth` for testing your code.
6060

6161
By default your instance will connect to the hub at `https://testnet.snapshot.org`. To change that (or other values) you can create a `.env.local` and overwrite the values from `.env`.
6262

63+
## Running service locally with Docker
64+
1. Run `docker build -t snapshot .` to build the image
65+
2. Run `docker run --name snapshot -p 8080:8080 snapshot` to run the container
66+
3. Go to `http://localhost:8080/#/fabien.eth` to test your code
67+
6368
## License
6469

6570
Snapshot is open-sourced software licensed under the © [MIT license](LICENSE).

0 commit comments

Comments
 (0)