Skip to content

Commit

Permalink
checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ihysi2024 committed Feb 19, 2025
2 parents 228c0db + 146cdd0 commit d015caf
Show file tree
Hide file tree
Showing 20 changed files with 7,875 additions and 3,794 deletions.
4 changes: 3 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ RUN go mod download
# Copy the entire project
COPY . .

WORKDIR /app/cmd
WORKDIR /app/cmd

CMD ["go", "run", "main.go"]
7 changes: 0 additions & 7 deletions backend/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,10 @@ import (
"os/signal"
"syscall"

"github.com/joho/godotenv"
"github.com/sethvargo/go-envconfig"
)

func main() {
err := godotenv.Load("../.env")
if err != nil {
log.Fatalf("Error loading .env file: %v", err)
return
}

var config config.Config
if err := envconfig.Process(context.Background(), &config); err != nil {
log.Fatalln("Error processing .env file: ", err)
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/service/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ func SetupApp(config config.Config, repo *storage.Repository, climatiqClient *cl

// Use CORS middleware to configure CORS and handle preflight/OPTIONS requests.
app.Use(cors.New(cors.Config{
AllowOrigins: "http://localhost:3000, http://localhost:8080", // Allow any source domain to access API
AllowMethods: "GET,POST,PUT,PATCH,DELETE", // Using these methods.
AllowOrigins: "http://localhost:3000, http://localhost:8080, https://arenius.onrender.com", // Allow any source domain to access API
AllowMethods: "GET,POST,PUT,PATCH,DELETE", // Using these methods.
AllowHeaders: "Origin, Content-Type, Accept, Authorization",
AllowCredentials: true, // Allow cookies
}))
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ services:
context: ./backend
ports:
- "8080:8080"
env_file:
- /backend/.env
command: go run main.go
develop:
watch:
Expand Down
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:22

WORKDIR /app

Expand Down
Loading

0 comments on commit d015caf

Please sign in to comment.