Deploy from coolify
publish-github-pages / deploy (push) Waiting to run

This commit is contained in:
h202-wq
2026-07-09 10:39:44 -04:00
parent 66d9a033c9
commit b7142809ae
9 changed files with 4488 additions and 11 deletions
+48 -1
View File
@@ -1,3 +1,50 @@
# Self-contained build for EagleCast. Builds the email-builder and admin
# frontend, compiles the Go backend, and stuffs all static assets into a
# single binary. Used by PaaS platforms like Coolify that build from git.
# (Release builds via goreleaser use Dockerfile.goreleaser instead.)
ARG APP_VERSION=v1.0.0
# ---- email-builder (React) ----
FROM node:22-alpine AS email-builder
WORKDIR /build/email-builder
COPY frontend/email-builder/package.json frontend/email-builder/yarn.lock ./
RUN yarn install --frozen-lockfile
COPY frontend/email-builder/ ./
RUN yarn build
# ---- admin frontend (Vue) ----
FROM node:22-alpine AS frontend
ARG APP_VERSION
WORKDIR /build/frontend
COPY frontend/package.json frontend/yarn.lock ./
RUN yarn install --frozen-lockfile
COPY frontend/ ./
COPY --from=email-builder /build/email-builder/dist ./public/static/email-builder
ENV VUE_APP_VERSION=${APP_VERSION}
RUN yarn build
# ---- backend (Go) ----
FROM golang:1.26-alpine AS backend
ARG APP_VERSION
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
RUN go install github.com/knadh/stuffbin/...@latest
COPY . .
COPY --from=frontend /build/frontend/dist ./frontend/dist
RUN CGO_ENABLED=0 go build -o eaglecast \
-ldflags="-s -w -X 'main.buildString=${APP_VERSION} (docker)' -X 'main.versionString=${APP_VERSION}'" \
./cmd
RUN /go/bin/stuffbin -a stuff -in eaglecast -out eaglecast \
config.toml.sample \
schema.sql queries:/queries permissions.json \
static/public:/public \
static/email-templates \
frontend/dist:/admin \
i18n:/i18n
# ---- runtime ----
FROM alpine:latest
# Install dependencies
@@ -7,7 +54,7 @@ RUN apk --no-cache add ca-certificates tzdata shadow su-exec
WORKDIR /eaglecast
# Copy only the necessary files
COPY eaglecast .
COPY --from=backend /build/eaglecast .
COPY config.toml.sample config.toml
# Copy the entrypoint script