Skip to content

Commit 370a1af

Browse files
committed
serve 위한 docker 추가 (with --draft 옵션)
1 parent 2e48d64 commit 370a1af

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ruby:3.2-slim
2+
3+
# 빌드/네이티브 gem 설치용 도구들
4+
RUN apt-get update && apt-get install -y \
5+
build-essential \
6+
git \
7+
nodejs \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
WORKDIR /srv/jekyll
11+
12+
# bundler가 컨테이너 안에 공용 경로를 쓰도록 (나중에 volume으로 캐시)
13+
ENV BUNDLE_PATH=/usr/local/bundle
14+
15+
# 실제 소스는 volume으로 마운트할 거라 여기선 아무것도 복사 안 함
16+

docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
services:
2+
blog:
3+
build: .
4+
container_name: chirpy-jekyll
5+
working_dir: /srv/jekyll
6+
command:
7+
- bash
8+
- -lc
9+
- bundle install && bundle exec jekyll serve --host 0.0.0.0 --port 4000 --livereload --force_polling --draft
10+
ports:
11+
- "4000:4000" # http://localhost:4000
12+
- "35729:35729" # livereload
13+
environment:
14+
JEKYLL_ENV: development
15+
volumes:
16+
- .:/srv/jekyll # 현재 chirpy 블로그 소스
17+
- bundle_cache:/usr/local/bundle # gem 캐시
18+
19+
volumes:
20+
bundle_cache:
21+

0 commit comments

Comments
 (0)