A web application built with Next.js, React, and MySQL, containerized using Docker/Podman. Designed as an internal application for Bukovel employees in Ukraine, the system provides functionality for managing workers and projects. Key features include role-based login, worker and project tracking, lift management with projects assigned to them, and a real-time chat, supporting both team-based and general channels.
- Next.js 15.2.4 with React 19
- MySQL 8.0.41 database
- Prisma ORM for database management
- Authentication with secure cookies
- Styled with SASS
- Containerized with Docker/Podman
- Docker or Podman installed on your system
- Git
- Node.js (for local development)
-
Clone the repository:
git clone https://github.com/chibriki/next-website.git cd next-website -
Create a
.envfile in the root directory with the following variables:DATABASE_URL="mysql://YOUR_NAME:YOUR_PASSWORD@db:3306/YOUR_DB?sslmode=disable" MYSQL_ROOT_PASSWORD=YOUR_PASSWORD MYSQL_DATABASE=YOUR_DB
Replace YOUR_NAME, YOUR_PASSWORD, YOUR_DB with valid credentials
-
Build and start the containers:
# Using Docker docker-compose up -d # Using Podman podman-compose up -d
The application will be available at http://localhost:3000
-
Install dependencies:
npm install
-
Generate the database:
npx prisma generate
-
Start the development server:
npm run dev
npm run dev- Start development servernpm run build- Build the applicationnpm run start- Start production servernpm run lint- Run ESLint
.
├── app/ # Next.js application code
├── prisma/ # Database schema and migrations
├── public/ # Static files
├── mysql-conf/ # MySQL configuration
├── docker-compose.yml # Docker/Podman configuration
└── Dockerfile # Container build instructions
- Database credentials are managed through environment variables
- SSL is disabled for local development
- authentication with HTTP-only cookies
The application runs in two containers:
-
Database Container
- MySQL 8.0.41
- Port: 3307
- Persistent volume for data storage
- Health checks enabled
-
Application Container
- Next.js application
- Port: 3000
- Depends on the database container
- Environment variables from the .env file