bump git
This commit is contained in:
@@ -3,13 +3,16 @@
|
|||||||
echo "Creating build environment"
|
echo "Creating build environment"
|
||||||
docker buildx create --name pibuilder --use
|
docker buildx create --name pibuilder --use
|
||||||
|
|
||||||
echo "Printing build environment info"
|
echo "Building backend"
|
||||||
docker buildx inspect --bootstrap
|
|
||||||
|
|
||||||
echo "Doing build"
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/arm64 \
|
--platform linux/arm64 \
|
||||||
--push \
|
--push \
|
||||||
-t gitea.coupxd.com/cody/go-weather:latest \
|
-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
@@ -6,7 +6,7 @@ server {
|
|||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://go-weather:8080/;
|
proxy_pass http://go-weather:8080;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export default defineConfig({
|
|||||||
proxy: {
|
proxy: {
|
||||||
"/api": {
|
"/api": {
|
||||||
target: "http://localhost:8080",
|
target: "http://localhost:8080",
|
||||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ func main() {
|
|||||||
go startPoller(database, weatherService, config.DefaultCity, 10*time.Minute)
|
go startPoller(database, weatherService, config.DefaultCity, 10*time.Minute)
|
||||||
|
|
||||||
// Register routes
|
// Register routes
|
||||||
http.HandleFunc("/weather/fetch", weatherHandler.FetchWeather)
|
http.HandleFunc("/api/weather/fetch", weatherHandler.FetchWeather)
|
||||||
http.HandleFunc("/weather/history", weatherHandler.GetHistory)
|
http.HandleFunc("/api/weather/history", weatherHandler.GetHistory)
|
||||||
http.HandleFunc("/health", handlers.Health)
|
http.HandleFunc("/api/health", handlers.Health)
|
||||||
http.HandleFunc("/latest-temperature", handlers.LatestTemperature)
|
http.HandleFunc("/api/latest-temperature", handlers.LatestTemperature)
|
||||||
http.HandleFunc("/test", handlers.Test)
|
http.HandleFunc("/api/test", handlers.Test)
|
||||||
// Start server
|
// Start server
|
||||||
go func() {
|
go func() {
|
||||||
fmt.Println("server listening on :8080")
|
fmt.Println("server listening on :8080")
|
||||||
|
|||||||
Reference in New Issue
Block a user