54 Commits

Author SHA1 Message Date
f9ec722f2e Merge pull request 'feature/ci-cd' (#1) from feature/ci-cd into main
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 3s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Reviewed-on: #1
2026-02-28 23:04:37 -06:00
4a3c1dfa39 remove testing lines in ci/cd 2026-02-28 23:02:45 -06:00
92f3e1e442 placeholder
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 8s
Build and Deploy Frontend / build-and-deploy (push) Successful in 7s
2026-02-28 20:26:11 -06:00
675595b248 comments 2026-02-28 20:25:19 -06:00
51766a0a5b real job name this time :3
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
2026-02-28 20:19:12 -06:00
6e36831db4 actually run on pipeline changes
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 3s
Build and Deploy Frontend / build-and-deploy (push) Successful in 3s
2026-02-28 20:18:14 -06:00
6ffb3e2e39 different job names 2026-02-28 20:17:21 -06:00
509f1d43b1 add those files actually oops
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 3s
Build and Deploy API / build-and-deploy (push) Successful in 3s
2026-02-28 20:11:03 -06:00
5ffbd518ad move docker composes into their directories
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
Build and Deploy API / build-and-deploy (push) Failing after 8s
2026-02-28 20:10:48 -06:00
e2e1af047c re: dotnet proxy config
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 20:07:20 -06:00
80ee3dcd0d re: dotnet proxy config
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 20:06:48 -06:00
6d2f6191d2 ?
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
2026-02-28 20:04:21 -06:00
90739763ce bro what did I change
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
2026-02-28 20:01:59 -06:00
6fd5abcaa9 definitive.
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:58:09 -06:00
fa7941bada im still skewptical
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:57:39 -06:00
7246dcc997 turns out you do need forwarded headers
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 3s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:55:29 -06:00
bf76634a38 different api routing
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:53:22 -06:00
d18a1a1680 whats my issue
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:47:30 -06:00
9aa0052531 explicitly set https port
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:14:26 -06:00
f08d5851c1 rebuild program.cs
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:09:06 -06:00
3a29070ef3 proxy configuration for dotnet api
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 3s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 19:02:39 -06:00
110e38daaf revert
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 3s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
2026-02-28 18:58:39 -06:00
8c5998d964 retest
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 3s
Build and Deploy Frontend / build-and-deploy (push) Successful in 3s
2026-02-28 18:56:52 -06:00
bc41132868 test
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
2026-02-28 18:53:41 -06:00
10cf7adb1e undo what I last did
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
2026-02-28 18:50:04 -06:00
f27a71dc35 test ports
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 7s
2026-02-28 18:48:52 -06:00
553006f36b re-do api dockerfile
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 3s
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
2026-02-28 18:46:22 -06:00
fdbcdd2d01 how about now ?
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 18:34:20 -06:00
a939fe2549 fix api url
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 8s
2026-02-28 18:33:41 -06:00
3875e11660 dont remove orphans
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
Build and Deploy Frontend / build-and-deploy (push) Successful in 3s
2026-02-28 16:28:04 -06:00
2ab1db131d do the same for the api job
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 4s
Build and Deploy API / build-and-deploy (push) Successful in 3s
2026-02-28 16:21:32 -06:00
dd81186a28 re: again
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 3s
2026-02-28 16:18:40 -06:00
cfc17b76dd remove name from up
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
2026-02-28 16:17:53 -06:00
3a6f26dd7a re: force
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
Build and Deploy API / build-and-deploy (push) Failing after 10s
2026-02-28 16:15:53 -06:00
0cc9f39416 force-recreate deployment container
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 2s
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
2026-02-28 16:12:55 -06:00
e5ca5f1dc6 rm network config from docker-compose
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
Build and Deploy API / build-and-deploy (push) Failing after 32s
2026-02-28 16:10:07 -06:00
035f0be8f0 change names in docker-compose
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 2s
Build and Deploy API / build-and-deploy (push) Has been cancelled
2026-02-28 15:54:05 -06:00
808c93e0e8 omg its yaml not yml
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 2s
Build and Deploy API / build-and-deploy (push) Failing after 40s
2026-02-28 15:52:57 -06:00
e241cf098e change urls
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
Build and Deploy API / build-and-deploy (push) Has been cancelled
2026-02-28 15:52:26 -06:00
18c62f3845 re: add
Some checks failed
Build and Deploy API / build-and-deploy (push) Has been cancelled
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
2026-02-28 15:51:21 -06:00
46f0b16ff3 separate the docker-compose files
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 3s
Build and Deploy API / build-and-deploy (push) Has been cancelled
2026-02-28 15:51:09 -06:00
c44ebca61f fix urls
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 31s
Build and Deploy Frontend / build-and-deploy (push) Failing after 9s
2026-02-28 15:43:43 -06:00
4fb582c500 test
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 2s
Build and Deploy API / build-and-deploy (push) Failing after 36s
2026-02-28 15:40:14 -06:00
0826d56249 re: image
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 0s
Build and Deploy API / build-and-deploy (push) Failing after 38s
2026-02-28 15:21:02 -06:00
e3b4794f2b wrong version oops
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 3s
Build and Deploy Frontend / build-and-deploy (push) Failing after 2s
2026-02-28 15:14:43 -06:00
87768ffc21 when in doubt ubuntu:latest
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 1s
Build and Deploy Frontend / build-and-deploy (push) Failing after 0s
2026-02-28 15:13:55 -06:00
38a3c59517 maybe this docker image will work
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 3s
Build and Deploy Frontend / build-and-deploy (push) Failing after 2s
2026-02-28 15:05:47 -06:00
e54b7eaa31 use nodes docker image
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 16s
2026-02-28 15:03:50 -06:00
579872bc78 only docus on client for now
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 10s
2026-02-28 15:01:58 -06:00
4898620214 oops
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 2s
Build and Deploy Frontend / build-and-deploy (push) Failing after 2s
2026-02-28 14:58:51 -06:00
508164cbce remove branch requirements for testing 2026-02-28 14:56:48 -06:00
eea3cccd95 runner tag 2026-02-28 14:54:38 -06:00
5a309e45fe preliminary ci/cd setup (horrors await me) 2026-02-28 14:52:59 -06:00
24b9f21541 deploy setup 2026-02-27 21:34:13 -06:00
10 changed files with 175 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
name: Build and Deploy API
run-name: "${{ gitea.event.head_commit.message }}: Deploy API"
on:
push:
branches:
- main
paths:
- "api/**"
- ".gitea/workflows/deploy-api.yaml"
jobs:
build-and-deploy:
runs-on: debian12
container:
image: git.vxbard.net/homeburger/bard-cpp-builder:1.0
steps:
- name: Checkout code
uses: actions/checkout@v3
# needs this in order to push to the registry
- name: Validate Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.vxbard.net \
-u ${{ secrets.REGISTRY_USERNAME }} \
--password-stdin
- name: Build image
run: |
docker build -t git.vxbard.net/homeburger/agologum-api:latest ./api
- name: Push image
run: |
docker push git.vxbard.net/homeburger/agologum-api:latest
- name: Deploy container
run: |
docker compose -f ./api/docker-compose.prod.yaml pull agologum-api
docker compose -f ./api/docker-compose.prod.yaml up -d --force-recreate agologum-api

View File

@@ -0,0 +1,42 @@
name: Build and Deploy Frontend
run-name: "${{ gitea.event.head_commit.message }}: Deploy Client"
on:
push:
branches:
- main
paths:
- "client/**"
- ".gitea/workflows/deploy-client.yaml"
jobs:
build-and-deploy:
runs-on: debian12
container:
image: git.vxbard.net/homeburger/bard-cpp-builder:1.0
steps:
- name: Checkout code
uses: actions/checkout@v3
# needs this in order to push to the registry
- name: Validate Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.vxbard.net \
-u ${{ secrets.REGISTRY_USERNAME }} \
--password-stdin
- name: Build image
run: |
docker build -t git.vxbard.net/homeburger/agologum-client:latest ./client
- name: Push
run: |
docker push git.vxbard.net/homeburger/agologum-client:latest
- name: Deploy
run: |
docker compose -f ./client/docker-compose.prod.yaml pull agologum-client
docker compose -f ./client/docker-compose.prod.yaml up -d --force-recreate agologum-client

20
api/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o /app/publish
# run
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
ENV ASPNETCORE_URLS=http://+:5000
COPY --from=build /app/publish ./
EXPOSE 5000
ENTRYPOINT ["dotnet", "agologum-api.dll"]

View File

@@ -1,11 +1,27 @@
using Microsoft.AspNetCore.HttpOverrides;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// configuration for behind my nginx proxy
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
options.ForwardedHeaders =
ForwardedHeaders.XForwardedFor |
ForwardedHeaders.XForwardedProto;
options.KnownNetworks.Clear();
options.KnownProxies.Clear();
});
// Add services to the container. // Add services to the container.
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi(); builder.Services.AddOpenApi();
var app = builder.Build(); var app = builder.Build();
app.UseForwardedHeaders();
// Configure the HTTP request pipeline. // Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment()) if (app.Environment.IsDevelopment())
{ {
@@ -14,12 +30,14 @@ if (app.Environment.IsDevelopment())
app.UseHttpsRedirection(); app.UseHttpsRedirection();
// below is a placeholder endpoint
var summaries = new[] var summaries = new[]
{ {
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
}; };
app.MapGet("/weatherforecast", () => app.MapGet("api/weatherforecast", () =>
{ {
var forecast = Enumerable.Range(1, 5).Select(index => var forecast = Enumerable.Range(1, 5).Select(index =>
new WeatherForecast new WeatherForecast

View File

@@ -5,5 +5,6 @@
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*",
"https_port": 443
} }

View File

@@ -0,0 +1,8 @@
services:
agologum-api:
image: git.vxbard.net/homeburger/agologum-api:latest
container_name: agologum-api
restart: always
ports:
- "5000:5000"

20
client/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# build vue app
FROM node:current-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# serve to nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -0,0 +1,9 @@
services:
agologum-client:
image: git.vxbard.net/homeburger/agologum-client:latest
container_name: agologum-client
restart: always
ports:
- "8080:80"

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title> <title>homeburger place</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

12
client/nginx.conf Normal file
View File

@@ -0,0 +1,12 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}