diff --git a/backend/cmd/api/main.go b/backend/cmd/api/main.go index 5eb1332..8f8af84 100644 --- a/backend/cmd/api/main.go +++ b/backend/cmd/api/main.go @@ -26,12 +26,12 @@ import ( // @x-extension ulid.ULID string -// @Summary Say hello -// @Description Get a hello message -// @ID hello -// @Produce plain -// @Success 200 {string} string "Hello from the Time Tracker Backend!" -// @Router / [get] +// @Summary Say hello +// @Description Get a hello message +// @ID hello +// @Produce plain +// @Success 200 {string} string "Hello from the Time Tracker Backend!" +// @Router / [get] func helloHandler(c *gin.Context) { c.String(http.StatusOK, "Hello from the Time Tracker Backend!") } @@ -41,9 +41,9 @@ func main() { dbConfig := models.DatabaseConfig{ Host: "localhost", Port: 5432, - User: "postgres", + User: "timetracker", Password: "password", - DBName: "mydatabase", + DBName: "timetracker", SSLMode: "disable", // For development environment } diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..437b22c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +services: + db: + image: postgres:14 + container_name: timetracker_db + restart: always + ports: + - "5432:5432" + environment: + POSTGRES_USER: timetracker + POSTGRES_PASSWORD: password + POSTGRES_DB: timetracker + volumes: + - db_data:/var/lib/postgresql/data + +volumes: + db_data: