mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-21 23:47:58 +00:00
Better docker image for the backend (#245)
* Ignore vscode settings * Add Dockerfile for the backend * Shrink the docker image for the backend a little more - fix some doc - switch the rust static builder base image to nightly - switch 2 stage base image - remove version label * Switch second stage base image to scratch * Switch to the in-house base image * Update README.md Co-authored-by: Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
build
|
||||
target
|
||||
Dockerfile
|
||||
build
|
||||
node_modules
|
||||
.git
|
||||
|
||||
@@ -99,9 +99,9 @@ If you don't you can download for you OS here [Docker Desktop](https://www.docke
|
||||
docker-compose up --build -d
|
||||
```
|
||||
|
||||
- `-d` stands for detach, if you would like to see logs I recommend using [Kitmatic](https://kitematic.com/) or don't use the -d
|
||||
- `--build` will build the images and rebuild, but this is not required every time
|
||||
- If you want to makes UI changes, there is no need to rebuild the image as the files are being copied in via volumes.
|
||||
- `-d` stands for detach, if you would like to see logs I recommend using [Kitmatic](https://kitematic.com/) or don't use the `-d`
|
||||
- `--build` will build the images and rebuild, but this is not required every time
|
||||
- If you want to makes UI changes, there is no need to rebuild the image as the files are being copied in via volumes.
|
||||
|
||||
Now navigate to [http://localhost:3000](http://localhost:3000/) in your browser to view the app.
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
target
|
||||
Dockerfile
|
||||
.git
|
||||
@@ -0,0 +1,26 @@
|
||||
#### BUILDER IMAGE -- quite big one ####
|
||||
FROM paritytech/musl-ci-linux as builder
|
||||
LABEL maintainer="Daniel Maricic daniel@woss.io"
|
||||
LABEL description="Polkadot Telemetry backend builder image"
|
||||
|
||||
ARG PROFILE=release
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cargo build --${PROFILE} --bins --target x86_64-unknown-linux-musl
|
||||
|
||||
|
||||
# MAIN IMAGE FOR PEOPLE TO PULL --- small one#
|
||||
FROM scratch
|
||||
LABEL maintainer="Daniel Maricic daniel@woss.io"
|
||||
LABEL description="Polkadot Telemetry backend, static build"
|
||||
|
||||
ARG PROFILE=release
|
||||
WORKDIR /usr/local/bin
|
||||
|
||||
COPY --from=builder /app/target/x86_64-unknown-linux-musl/$PROFILE/telemetry /usr/local/bin
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["telemetry"]
|
||||
Reference in New Issue
Block a user