-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and docker compose example
- Loading branch information
1 parent
1c5cb82
commit af3cd58
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
target | ||
config*.toml | ||
Dockerfile | ||
docker-compose.yml | ||
README.md | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM node:19.9 AS frontend | ||
|
||
WORKDIR /frontend | ||
RUN npm install -g pnpm | ||
COPY frontend . | ||
RUN pnpm i | ||
ENV NODE_ENV=production | ||
RUN pnpm run build | ||
|
||
FROM rust:1.68 AS backend | ||
WORKDIR /usr/src/status-page | ||
COPY ["Cargo.lock", "Cargo.toml", "./"] | ||
RUN cargo | ||
COPY src src/ | ||
RUN cargo install --path . | ||
|
||
FROM debian:bullseye-slim | ||
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* | ||
COPY --from=backend /usr/local/cargo/bin/simple-status-page app | ||
COPY --from=frontend /frontend/build web | ||
|
||
CMD ["./app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
services: | ||
redis: | ||
image: redis:alpine | ||
networks: | ||
- backend | ||
app: | ||
image: ghcr.io/data5tream/status-page-test:latest | ||
ports: | ||
- 8080:8080 | ||
networks: | ||
- default | ||
- backend | ||
volumes: | ||
- ./config.toml:/config.toml | ||
networks: | ||
default: | ||
backend: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
.svelte-kit | ||
.build | ||
.node_modules |