Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-06-05 14:24:48 +01:00
parent 050f25bba9
commit ed958a8ed0
41 changed files with 1885 additions and 480 deletions

View File

@@ -2,8 +2,7 @@ FROM docker.io/library/rust AS builder
ARG BUILD_MODE=debug
RUN apt-get update && apt-get install -y musl-tools && apt-get clean
RUN rustup target add x86_64-unknown-linux-musl
RUN apt-get update && apt-get clean
WORKDIR /app
@@ -13,11 +12,13 @@ RUN cargo fetch
RUN rm -rf src
COPY src ./src
COPY migrations ./migrations
COPY .sqlx ./.sqlx
RUN cargo build --target=x86_64-unknown-linux-musl $(if [ "$BUILD_MODE" = "release" ]; then echo "--release"; else echo ""; fi)
RUN mkdir -p build && cp target/x86_64-unknown-linux-musl/$(if [ "$BUILD_MODE" = "release" ]; then echo "release"; else echo "debug"; fi)/glyph build/glyph
RUN cargo build $(if [ "$BUILD_MODE" = "release" ]; then echo "--release"; else echo ""; fi)
RUN mkdir -p build && cp target/$(if [ "$BUILD_MODE" = "release" ]; then echo "release"; else echo "debug"; fi)/glyph build/glyph
FROM docker.io/library/alpine
FROM docker.io/library/debian:bookworm-slim
COPY --from=builder /app/build/glyph /usr/local/bin/glyph

View File

@@ -20,6 +20,19 @@ spec:
"/etc/glyph/log4rs.yml",
]
- name: postgresql
image: docker.io/library/postgres:latest
env:
- name: POSTGRES_DB
value: glyph
- name: POSTGRES_USER
value: glyph
- name: POSTGRES_PASSWORD
value: glyph
ports:
- containerPort: 5432
hostPort: 5432
- name: redis
image: docker.io/library/redis:latest