refactor(app): moved main.ts to root of app folder it was doing weird things with ts stuff

This commit is contained in:
2025-09-07 15:35:30 -05:00
parent 50927ca341
commit 0273703bfb
5 changed files with 13 additions and 96 deletions

View File

@@ -1,71 +0,0 @@
# # ---- Builder Stage ----
# FROM golang:1.24.4-alpine3.22 AS builder
# WORKDIR /app/controller
# # Copy Go module manifests
# COPY controller/go.mod controller/go.sum ./
# RUN go mod download
# # Copy the controller source code
# COPY controller/ ./
# # Build the binary
# RUN CGO_ENABLED=0 GOOS=linux go build -o /app/lst_ctl .
# # ---- Runtime Stage ----
# FROM alpine:latest
# WORKDIR /root/
# # Copy only the binary (no need for sources)
# COPY --from=builder /app/lst_ctl .
# # (Optional) Persist data output if controller writes files
# RUN mkdir -p /data
# VOLUME /data
# # Expose Gin API port
# EXPOSE 8080
# ENV RUNNING_IN_DOCKER=true
# CMD ["./lst_ctl"]
# ---- Build Go binary ----
FROM golang:1.24.4-alpine3.22 AS gobuilder
WORKDIR /src
# copy controller module
COPY controller/go.mod controller/go.sum ./
RUN go mod download
# copy all controller source code
COPY controller/ ./
# build binary into /bin
RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/lst_ctl .
# ---- Runtime with Node ----
FROM node:20-alpine
WORKDIR /app
# copy binary from builder
COPY --from=gobuilder /bin/lst_ctl /usr/local/bin/lst_ctl
# copy repo root into /app (npm needs package.json, dist/, frontend/, etc)
COPY . .
# clear Node's default entrypoint (Docker Hub node images use ["docker-entrypoint.sh"])
ENTRYPOINT []
# expose gin api
EXPOSE 8080
ENV RUNNING_IN_DOCKER=true
# run binary (in PATH now, since it's under /usr/local/bin)
CMD ["lst_ctl"]

View File

@@ -1,13 +0,0 @@
services:
controller:
build:
context: .. # repo root
dockerfile: controller/Dockerfile
working_dir: /root
environment:
- RUNNING_IN_DOCKER=true
volumes:
- ..:/app # mount repo root for zipping, etc.
- ../builds:/builds # clean host->container builds mapping
ports:
- "8080:8080"