This commit is contained in:
2026-10-22 15:29:30 -07:00
parent 6c2379976d
commit 8c41e07d80
4 changed files with 13 additions and 11 deletions
+7 -4
View File
@@ -3,13 +3,16 @@
echo "Creating build environment"
docker buildx create --name pibuilder --use
echo "Printing build environment info"
docker buildx inspect --bootstrap
echo "Doing build"
echo "Building backend"
docker buildx build \
--platform linux/arm64 \
--push \
-t gitea.coupxd.com/cody/go-weather:latest \
.
echo "Building frontend"
docker buildx build \
--platform linux/arm64 \
--push \
-t gitea.coupxd.com/cody/go-weather-frontend:latest \
./frontend
+1 -1
View File
@@ -6,7 +6,7 @@ server {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://go-weather:8080/;
proxy_pass http://go-weather:8080;
}
}
-1
View File
@@ -16,7 +16,6 @@ export default defineConfig({
proxy: {
"/api": {
target: "http://localhost:8080",
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
+5 -5
View File
@@ -75,11 +75,11 @@ func main() {
go startPoller(database, weatherService, config.DefaultCity, 10*time.Minute)
// Register routes
http.HandleFunc("/weather/fetch", weatherHandler.FetchWeather)
http.HandleFunc("/weather/history", weatherHandler.GetHistory)
http.HandleFunc("/health", handlers.Health)
http.HandleFunc("/latest-temperature", handlers.LatestTemperature)
http.HandleFunc("/test", handlers.Test)
http.HandleFunc("/api/weather/fetch", weatherHandler.FetchWeather)
http.HandleFunc("/api/weather/history", weatherHandler.GetHistory)
http.HandleFunc("/api/health", handlers.Health)
http.HandleFunc("/api/latest-temperature", handlers.LatestTemperature)
http.HandleFunc("/api/test", handlers.Test)
// Start server
go func() {
fmt.Println("server listening on :8080")