Skip to content

Commit d74f4f3

Browse files
committed
Rewrite
1 parent 42830f4 commit d74f4f3

27 files changed

Lines changed: 236 additions & 1001 deletions

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git/
2+
.idea/
3+
target/
4+
logs/
5+
*.iml

.github/workflows/docker.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build and push Docker image
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: docker/setup-buildx-action@v3
13+
- uses: docker/login-action@v3
14+
with:
15+
registry: ghcr.io
16+
username: ${{ github.actor }}
17+
password: ${{ secrets.GITHUB_TOKEN }}
18+
- uses: docker/build-push-action@v6
19+
with:
20+
push: true
21+
tags: ghcr.io/wavesplatform/wavesfaucet:latest
22+
cache-from: type=gha
23+
cache-to: type=gha,mode=max

.scalafmt.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version = "3.9.4"
2+
runner.dialect = scala3
3+
style = defaultWithAlign
4+
assumeStandardLibraryStripMargin = true
5+
maxColumn = 150
6+
docstrings.wrap = keep

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM eclipse-temurin:21-jdk AS builder
2+
3+
RUN wget "https://github.com/sbt/sbt/releases/download/v1.12.9/sbt-1.12.9.tgz" -O /tmp/sbt.tgz && \
4+
tar -xzf /tmp/sbt.tgz -C /usr/local
5+
6+
ENV PATH="/usr/local/sbt/bin:$PATH"
7+
8+
WORKDIR /build
9+
10+
COPY build.sbt .
11+
COPY project/ project/
12+
RUN sbt update
13+
14+
COPY . .
15+
RUN sbt stage
16+
17+
18+
FROM eclipse-temurin:17-jre
19+
20+
WORKDIR /app
21+
COPY --from=builder /build/target/universal/stage .
22+
23+
EXPOSE 9000
24+
25+
ENTRYPOINT ["bin/wavesfaucet"]

README

Lines changed: 11 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,11 @@
1-
This is your new Play application
2-
=================================
3-
4-
This file will be packaged with your application when using `activator dist`.
5-
6-
There are several demonstration files available in this template.
7-
8-
Controllers
9-
===========
10-
11-
- HomeController.scala:
12-
13-
Shows how to handle simple HTTP requests.
14-
15-
- AsyncController.scala:
16-
17-
Shows how to do asynchronous programming when handling a request.
18-
19-
- CountController.scala:
20-
21-
Shows how to inject a component into a controller and use the component when
22-
handling requests.
23-
24-
Components
25-
==========
26-
27-
- Module.scala:
28-
29-
Shows how to use Guice to bind all the components needed by your application.
30-
31-
- Counter.scala:
32-
33-
An example of a component that contains state, in this case a simple counter.
34-
35-
- ApplicationTimer.scala:
36-
37-
An example of a component that starts when the application starts and stops
38-
when the application stops.
39-
40-
Filters
41-
=======
42-
43-
- Filters.scala:
44-
45-
Creates the list of HTTP filters used by your application.
46-
47-
- ExampleFilter.scala
48-
49-
A simple filter that adds a header to every response.
1+
```
2+
docker build -t waves-faucet .
3+
4+
docker run -p 9000:9000 \
5+
-e JAVA_OPTS="\
6+
-Dfaucet.waves-node-url=http://your-node:6869 \
7+
-Dfaucet.private-key=YOUR_BASE58_PRIVATE_KEY \
8+
-Dfaucet.pay-amount=1000000000 \
9+
-Dfaucet.recaptcha-secret=YOUR_SECRET" \
10+
waves-faucet
11+
```

app/Filters.scala

Lines changed: 0 additions & 37 deletions
This file was deleted.

app/Module.scala

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/controllers/AsyncController.scala

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/controllers/CountController.scala

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/controllers/HomeController.scala

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)