์ฐํํ๋ ฅํ๋ก์ ํธ ๊ณผ๋ชฉ (3230) ํ ํ๋ก์ ํธ
์ด ํ๋ก์ ํธ๋ ํด๋ผ์ฐ๋ ์ธ์คํด์ค์์ ์คํ๋๋ ํ์คํ ์ ํ๋ฆฌ์ผ์ด์
์
๋๋ค.
๋ฆฌ์กํธ ํ๋ก ํธ์๋์ Node.js ๋ฐฑ์๋๋ก ๊ตฌ์ฑ๋์ด ์์ผ๋ฉฐ, Nginx๋ฅผ ์ฌ์ฉํ์ฌ ๋ฆฌ๋ฒ์ค ํ๋ก์์ ์ ์ ํ์ผ ์๋น์ ๋ด๋นํฉ๋๋ค.
์ธ์ฆ์๋ Let's Encrypt๋ฅผ ์ฌ์ฉํ์ฌ HTTPS๋ฅผ ์ง์ํฉ๋๋ค.
GCP ๋๋ AWS์์ ์ธ์คํด์ค๋ฅผ ์์ฑํฉ๋๋ค. ์ธ์คํด์ค์ ๋ฐฉํ๋ฒฝ ์ค์ ์์ TCP ํฌํธ 80๊ณผ 443์ ์ฝ๋๋ค.
์ธ์คํด์ค์ ๊ณ ์ IP๋ฅผ ์ฌ์ฉํ์ฌ ๋๋ฉ์ธ์ ๊ตฌ์ ํ๊ฑฐ๋ ์ค์ ํฉ๋๋ค.
์ธ์คํด์ค์ SSH์ ์ ์ํ์ฌ ํ๋ก์ ํธ ๋ฆฌํฌ์งํ ๋ฆฌ๋ฅผ ํด๋ก ํฉ๋๋ค.
git clone https://github.com/your-repo/Tooktak.git
cd Tooktak
chmod +x ./setup.sh
./setup.sh
sudo docker-compose up --build -d
sudo docker run -it --rm \
-v $(pwd)/certbot/conf:/etc/letsencrypt \
-v $(pwd)/certbot/www:/var/www/certbot \
certbot/certbot certonly \
--webroot --webroot-path=/var/www/certbot \
--email yourEmail@example.com --agree-tos --no-eff-email \
-d yourDomain
sudo docker-compose down
server {
listen 443 ssl;
server_name yourDomain;
ssl_certificate /etc/letsencrypt/live/yourDomain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourDomain/privkey.pem;
...
}
sudo docker-compose up --build -d
Let's Encrypt ์ธ์ฆ์๋ 90์ผ ๋์ ์ ํจํฉ๋๋ค. ์ธ์ฆ์ ์๋ ๊ฐฑ์ ์ ์ค์ ํ์ฌ ๊ฐฑ์ ์ ์๋ํํ ์๋ ์์ต๋๋ค.