This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
This project includes Docker configuration for easy deployment. You can deploy it using Docker in two ways:
-
Build and run the application using Docker Compose:
docker-compose up --build
-
Access the application at http://localhost:3000
Этот проект настроен для деплоя на Timeweb Apps:
- В панели Timeweb создайте базу данных PostgreSQL
- Скопируйте строку подключения к базе данных
- Закоммитьте код в Git репозиторий
- В Timeweb Apps создайте новое приложение
- Подключите ваш репозиторий
- Сервис автоматически обнаружит Dockerfile и развернет приложение
В настройках приложения Timeweb Apps укажите:
DATABASE_URL- строка подключения к вашей PostgreSQL БД (из шага 1)
После первого деплоя выполните SQL запросы для создания таблиц:
-- Создание таблицы настроек
CREATE TABLE IF NOT EXISTS settings (
id SERIAL PRIMARY KEY,
key VARCHAR(255) UNIQUE NOT NULL,
value TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Создание таблицы проектов
CREATE TABLE IF NOT EXISTS projects (
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
description TEXT,
image_url TEXT,
project_url TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Вставка начальных настроек
INSERT INTO settings (key, value) VALUES
('admin_telegram_ids', '[]')
ON CONFLICT (key) DO NOTHING;Alternatively, you can deploy on Vercel:
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.