Welcome to our project! 🚀 This is a special blend of Go, PostgreSQL, and Next.js 14, working together to handle user-related actions. Buckle up for some CRUD magic!
- Docker
- Docker Compose
- Clone the project.
- Go to the project folder.
Open your terminal and start the party:
docker-compose up -d db # Start the database
docker-compose up # Launch Go backend, PostgreSQL, and Next.js frontendWant to peek behind the scenes? Connect to the database:
docker exec -it db psql -U postgresIn next.config.js, change:
const nextConfig = {
reactStrictMode: true,
}to:
const nextConfig = {
output: 'standalone',
};Finding Your Spot
Frontend: http://localhost:3000
Backend API: http://localhost:8000
Behind the Scenes: Environment Variables For the Frontend (nextapp)
NEXT_PUBLIC_API_URL: Go backend API URL (default: http://localhost:8000)
For the Go Backend (goapp)
DATABASE_URL: PostgreSQL database connection URL
For the PostgreSQL Database (db)
POSTGRES_USER: Username (default: postgres)
POSTGRES_PASSWORD: Password (default: postgres)
POSTGRES_DB: Database name (default: postgres)
Notes Backstage
Ensure Docker and Docker Compose are installed.
Check out Dockerfiles (next.dockerfile and go.dockerfile) for image secrets.