접근
브라우저를 열고 다음 주소를 방문하세요: https://<SERVER_IP>
A browser SSL warning is expected due to the self-signed certificate.
Create an admin user by running the following command on the server:
cd /opt/planka && docker compose run --rm planka npm run db:create-admin-user
Log in using the newly created admin account.
중요한 파일 및 디렉터리
- 설치 디렉터리:
/opt/planka - Docker Compose 파일:
/opt/planka/docker-compose.yml - App data volume:
/var/lib/docker/volumes/planka_data/_data - PostgreSQL 데이터 볼륨:
/var/lib/docker/volumes/planka_db-data/_data - Custom terms directory:
/opt/planka/terms - Nginx 설정:
/etc/nginx/sites-available/planka - 활성화된 사이트:
/etc/nginx/sites-enabled/planka - SSL 인증서:
/etc/nginx/ssl/fullchain.pem,/etc/nginx/ssl/privkey.pem
Common Management Commands
cd /opt/planka
# Check running containers
docker ps
# Logs (live)
docker compose logs -f
# Restart services
docker compose restart
# Stop stack
docker compose down
# Start stack
docker compose up -d
도메인에 SSL 활성화하기
1. 도메인을 서버 IP로 연결하십시오.
2. 편집 docker-compose.yml 도메인을 다음과 같이 설정하려면 BASE_URL: BASE_URL=https://yourdomain.com
3. Restart PLANKA services:
cd /opt/planka/
docker compose up -d
4. Nginx 구성 파일을 편집하고 두 개 모두를 교체하십시오. server_name <IP>; 귀하의 도메인과 함께 (<yourdomain.com>HTTP(포트 80) 및 HTTPS(포트 443) 블록 모두에 대해:
vim /etc/nginx/sites-available/planka
5. Certbot 설치:
apt install -y certbot python3-certbot-nginx
6. 유효한 Let’s Encrypt 인증서를 생성하려면 다음 명령어를 실행하십시오:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
7. Nginx 설정 파일에서 SSL 경로 변경:
vim /etc/nginx/sites-available/planka
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
8. 변경 사항을 적용하려면 Nginx를 재시작하십시오:
systemctl restart nginx
9. 브라우저를 열고 다음 주소를 방문하세요: https://yourdomain.com
