Skip to content

🐙 Docker Compose Installation Guide

This document provides detailed steps for deploying New API using Docker Compose.

📋 Prerequisites

  • Docker and Docker Compose installed
  • Recommended system: Linux (Ubuntu/CentOS/Debian, etc.)

🔄 Deploying with Docker Compose

If you can access GitHub normally, this method is recommended:

# Download project source code
git clone https://github.com/Calcium-Ion/new-api.git

# Enter project directory
cd new-api

✍️ Method 2: Manually Creating Configuration Files

If you cannot access GitHub or clone the repository, you can manually create configuration files:

  1. Create a directory for New API deployment:
mkdir new-api
cd new-api
  1. Create a docker-compose.yml file in this directory

You can refer to the configuration examples in the Docker Compose Configuration Guide document and choose based on your needs:

  • Production environment: Recommended to use complete configuration (including MySQL and Redis)
  • Testing environment: Can use simplified configuration

  • Create the file using a text editor:

# Using nano editor
nano docker-compose.yml

# Or using vim editor
vim docker-compose.yml

Copy the selected configuration content to this file and customize it as needed.

🚀 Starting Services

After the configuration file is ready, whether you cloned via Git or created manually, you can use the following command to start services:

# Start services using Docker Compose
docker compose up -d

This command will automatically pull the required images and start services in the background.

📋 Viewing Logs

# View service logs
docker compose logs -f

🛑 Stopping Services

# Stop services
docker compose down

🌐 Accessing the System

After services start successfully, visit http://server-IP:3000 to enter the system.

Default admin username: root
Default admin password: 123456

Important

It is recommended to change the default password immediately after first login.