Skip to content

Commit 749d918

Browse files
committed
Add local container setup and configuration for Jekyll site
1 parent 995f1bd commit 749d918

File tree

5 files changed

+120
-0
lines changed

5 files changed

+120
-0
lines changed

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Jekyll 빌드 결과물
2+
_site/
3+
.sass-cache/
4+
.jekyll-cache/
5+
.jekyll-metadata
6+
7+
# Bundler
8+
.bundle/
9+
vendor/
10+
Gemfile.lock
11+
12+
# IDE
13+
.idea/
14+
.vscode/
15+
*.swp
16+
*.swo
17+
18+
# OS
19+
.DS_Store
20+
Thumbs.db
21+
22+
# Docker
23+
docker-compose.override.yml

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM ruby:3.2-slim
2+
3+
# 필수 패키지 설치
4+
RUN apt-get update && apt-get install -y \
5+
build-essential \
6+
git \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
# Jekyll 및 Bundler 설치
10+
RUN gem install jekyll bundler
11+
12+
# 작업 디렉토리 설정
13+
WORKDIR /site
14+
15+
# Gemfile 복사 및 의존성 설치
16+
COPY Gemfile* ./
17+
RUN bundle install || true
18+
19+
# 소스 복사
20+
COPY . .
21+
22+
# 포트 노출
23+
EXPOSE 4000
24+
25+
# Jekyll 서버 실행
26+
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--livereload"]

Gemfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
source "https://rubygems.org"
2+
3+
# GitHub Pages 호환 버전 사용
4+
gem "github-pages", group: :jekyll_plugins
5+
6+
# Jekyll 플러그인
7+
group :jekyll_plugins do
8+
gem "jekyll-feed"
9+
gem "jekyll-seo-tag"
10+
end
11+
12+
# Windows 및 JRuby 지원
13+
platforms :mingw, :x64_mingw, :mswin, :jruby do
14+
gem "tzinfo", ">= 1", "< 3"
15+
gem "tzinfo-data"
16+
end
17+
18+
# Windows 파일 시스템 감시
19+
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
20+
21+
# HTTP 파서
22+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
11
# dotnetdevkr.github.io
22

33
이 리포지터리는 dotnetdev.kr 도메인을 위한 웹 콘텐츠 및 단체 설립에 관련된 공시 자료를 담는 공개 리포지터리입니다.
4+
5+
## 로컬 개발 환경
6+
7+
이 사이트를 로컬에서 미리보려면 Podman을 사용하여 컨테이너를 실행할 수 있습니다.
8+
9+
### 사전 요구사항
10+
11+
- [Podman Desktop](https://podman-desktop.io/) 설치
12+
- Python 3.x 런타임 설치
13+
- `podman-compose` 설치: `pip install podman-compose`
14+
15+
### 실행 방법
16+
17+
```bash
18+
# 컨테이너 빌드 및 실행
19+
podman-compose up --build
20+
21+
# 또는 백그라운드 실행
22+
podman-compose up -d --build
23+
```
24+
25+
### 접속
26+
27+
웹 브라우저에서 `http://localhost:4000` 접속
28+
29+
LiveReload가 활성화되어 파일 수정 시 자동 새로고침됩니다.
30+
31+
### 종료
32+
33+
```bash
34+
podman-compose down
35+
```

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
jekyll:
3+
build: .
4+
ports:
5+
- "4000:4000"
6+
- "35729:35729" # LiveReload 포트
7+
volumes:
8+
- .:/site:Z
9+
- bundle_cache:/usr/local/bundle:Z
10+
environment:
11+
- JEKYLL_ENV=development
12+
command: bundle exec jekyll serve --host 0.0.0.0 --livereload --force_polling
13+
security_opt:
14+
- label=disable # SELinux 호환성
15+
16+
volumes:
17+
bundle_cache:

0 commit comments

Comments
 (0)