From 73a1d1a7e8d0a15174322637622a6aeb248fe287 Mon Sep 17 00:00:00 2001 From: yuzu Date: Wed, 7 May 2025 13:38:52 -0500 Subject: [PATCH] add some fixes for prod --- Dockerfile | 4 ++-- build.zig.zon | 8 ++++---- compose.yml | 35 +++++++++++++++++------------------ src/app/views/rss.zig | 4 ++-- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index 00e89ed..0036d43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:latest AS build RUN apk add jq curl tar xz git vim -RUN curl --output /zig.tar.xz "$(curl -s 'https://ziglang.org/download/index.json' | jq -r '.master."86_64-linux".tarball')" +RUN curl --output /zig.tar.xz "$(curl -s 'https://ziglang.org/download/index.json' | jq -r '.master."aarch64-linux".tarball')" RUN mkdir /zig WORKDIR /zig @@ -13,7 +13,7 @@ RUN /zig/zig-*/zig build -Denvironment=production install run mkdir /jetzig WORKDIR /jetzig -RUN git clone https://github.com/yuzudev/jetzig . +RUN git clone https://git.yuzucchii.xyz/yuzucchii/jetzig . WORKDIR ./cli RUN /zig/zig-*/zig build install diff --git a/build.zig.zon b/build.zig.zon index ca04d31..f44544c 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -24,14 +24,14 @@ // Once all dependencies are fetched, `zig build` no longer requires // internet connectivity. .dependencies = .{ - .jetzig = .{ - .url = "https://github.com/jetzig-framework/jetzig/archive/bb724b48f62605ca63dca5bb21805b2ed1683557.tar.gz", - .hash = "jetzig-0.0.0-IpAgLf5aDwCfevsEIt-MOj1YUZI0IdhNCCuEBYXQcEkc", - }, .uuid = .{ .url = "git+https://github.com/r4gus/uuid-zig#9d66e23e32cd7208d1becb4fd9352f8a27f89551", .hash = "uuid-0.3.0-oOieIYF1AAA_BtE7FvVqqTn5uEYTvvz7ycuVnalCOf8C", }, + .jetzig = .{ + .url = "git+https://git.yuzucchii.xyz/yuzucchii/jetzig#6baa8c114ad739e5461584dfc79df5b7792557bf", + .hash = "jetzig-0.0.0-IpAgLURbDwD5jrmRznyPbGcMGFusxX1xXU1_FVFozIBL", + }, }, .paths = .{ "build.zig", diff --git a/compose.yml b/compose.yml index 6b371aa..c31fe35 100644 --- a/compose.yml +++ b/compose.yml @@ -1,16 +1,16 @@ services: - # server: - # env_file: ".env" - # build: - # context: . - # dockerfile: Dockerfile - # ports: - # - "8080:8080" - # restart: unless-stopped - # depends_on: - # - postgres - # networks: - # - postgres-network + server: + env_file: ".env" + build: + context: . + dockerfile: Dockerfile + ports: + - "8080:8080" + restart: unless-stopped + depends_on: + - postgres + networks: + - postgres-network postgres: image: postgres:16 @@ -22,10 +22,9 @@ services: - "5432:5432" volumes: - ./data/:/var/lib/postgresql/data/ -# networks: -# - postgres-network - -# networks: -# postgres-network: -# driver: bridge + networks: + - postgres-network +networks: + postgres-network: + driver: bridge diff --git a/src/app/views/rss.zig b/src/app/views/rss.zig index 6aff48f..b38188b 100644 --- a/src/app/views/rss.zig +++ b/src/app/views/rss.zig @@ -19,9 +19,9 @@ fn generateRss(items: []const RssItem, allocator: std.mem.Allocator) ![]u8 { \\ \\ \\yuzucchii.xyz - \\yuzucchii.xyz + \\https://yuzucchii.xyz \\Personal blog of Yuzu with all kinds of different articles - \\ + \\ , .{}); for (items) |item| {