Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a4dce8df
Commit
a4dce8df
authored
Feb 05, 2015
by
Johan Euphrosine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contrib/git-sync: fix demo
parent
88734263
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
19 deletions
+44
-19
README.md
contrib/git-sync/README.md
+1
-1
pod.yaml
contrib/git-sync/demo/config/pod.yaml
+10
-10
Dockerfile
contrib/git-sync/demo/hugo/Dockerfile
+19
-6
README.md
contrib/git-sync/demo/hugo/README.md
+12
-0
run-hugo
contrib/git-sync/demo/hugo/run-hugo
+2
-2
No files found.
contrib/git-sync/README.md
View file @
a4dce8df
...
@@ -10,7 +10,7 @@ It can be used to source a container volume with the content of a git repo.
...
@@ -10,7 +10,7 @@ It can be used to source a container volume with the content of a git repo.
# build the container
# build the container
docker build -t git-sync .
docker build -t git-sync .
# run the git-sync container
# run the git-sync container
docker run -d GIT_SYNC_REPO=https://github.com/GoogleCloudPlatform/kubernetes
-e GIT_SYNC_BRANCH=gh-pages -r HEAD
-v /git-data:/git git-sync
docker run -d GIT_SYNC_REPO=https://github.com/GoogleCloudPlatform/kubernetes
GIT_SYNC_DEST=/git -e GIT_SYNC_BRANCH=gh-pages -r HEAD GIT_SYNC_DEST=/git
-v /git-data:/git git-sync
# run a nginx container to serve sync'ed content
# run a nginx container to serve sync'ed content
docker run -d -p 8080:80 -v /git-data:/usr/share/nginx/html nginx
docker run -d -p 8080:80 -v /git-data:/usr/share/nginx/html nginx
```
```
contrib/git-sync/demo/config/pod.yaml
View file @
a4dce8df
...
@@ -8,11 +8,11 @@ desiredState:
...
@@ -8,11 +8,11 @@ desiredState:
-
name
:
git-sync
-
name
:
git-sync
image
:
proppy/git-sync
image
:
proppy/git-sync
imagePullPolicy
:
PullAlways
imagePullPolicy
:
PullAlways
env:
:
env
:
-
name
:
GIT_SYNC_REPO
-
name
:
GIT_SYNC_REPO
value
:
https://github.com/proppy/blog
.git
value
:
https://github.com/GoogleCloudPlatform/kubernetes
.git
-
name
:
GIT_SYNC_DEST
-
name
:
GIT_SYNC_DEST
value
:
/git
value
:
/git
volumeMounts
:
volumeMounts
:
-
name
:
markdown
-
name
:
markdown
mountPath
:
/git
mountPath
:
/git
...
@@ -20,12 +20,12 @@ desiredState:
...
@@ -20,12 +20,12 @@ desiredState:
image
:
proppy/hugo
image
:
proppy/hugo
imagePullPolicy
:
PullAlways
imagePullPolicy
:
PullAlways
env
:
env
:
-
name
:
SRC
-
name
:
HUGO_
SRC
value
:
/src
value
:
/src
/contrib/git-sync/demo/blog
-
name
:
BUILD_DRAFT
-
name
:
HUGO_
BUILD_DRAFT
value
:
'
true'
value
:
'
true'
-
name
:
BASE_URL
-
name
:
HUGO_
BASE_URL
value
:
kube.proppy.sh
value
:
example.com
volumeMounts
:
volumeMounts
:
-
name
:
markdown
-
name
:
markdown
mountPath
:
/src
mountPath
:
/src
...
...
contrib/git-sync/demo/hugo/Dockerfile
View file @
a4dce8df
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM
golang
FROM
golang
RUN
go get
-v
github.com/spf13/hugo
RUN
go get
-v
github.com/spf13/hugo
RUN
git clone
--recursive
https://github.com/spf13/hugoThemes.git /themes
RUN
git clone
--recursive
https://github.com/spf13/hugoThemes.git /themes
VOLUME
["/src", "/dest"]
VOLUME
["/src", "/dest"]
EXPOSE
1313
EXPOSE
1313
ENV
SRC /src
ENV
HUGO_
SRC /src
ENV
DEST /dest
ENV
HUGO_
DEST /dest
ENV
THEME hyde
ENV
HUGO_
THEME hyde
ENV
BUILD_DRAFT false
ENV
HUGO_
BUILD_DRAFT false
ENV
BASE_URL ""
ENV
HUGO_
BASE_URL ""
ADD
run-hugo /run-hugo
ADD
run-hugo /run-hugo
ENTRYPOINT
["/run-hugo"]
ENTRYPOINT
["/run-hugo"]
CMD
["server", "--source=${
SRC}", "--theme=${THEME}", "--buildDrafts=${BUILD_DRAFT}", "--baseUrl=${BASE_URL}", "--watch", "--destination=${
DEST}", "--appendPort=false"]
CMD
["server", "--source=${
HUGO_SRC}", "--theme=${HUGO_THEME}", "--buildDrafts=${HUGO_BUILD_DRAFT}", "--baseUrl=${HUGO_BASE_URL}", "--watch", "--destination=${HUGO_
DEST}", "--appendPort=false"]
contrib/git-sync/demo/hugo/README.md
0 → 100644
View file @
a4dce8df
# hugo
`hugo`
is a container that convert markdown into html using
[
hugo static site generator
](
http://gohugo.io/
)
.
## Usage
```
# build the container
docker build -t hugo .
# run the hugo container
docker run -e HUGO_BASE_URL=example.com -v /path/to/md:/src -v /path/to/html:/dest hugo
``
contrib/git-sync/demo/hugo/run-hugo
View file @
a4dce8df
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# limitations under the License.
# limitations under the License.
set
-ex
set
-ex
if
[
!
-d
${
SRC
}
/themes
]
;
then
if
[
!
-d
${
HUGO_
SRC
}
/themes
]
;
then
ln
-s
/themes
${
SRC
}
/themes
ln
-s
/themes
${
HUGO_
SRC
}
/themes
fi
fi
hugo
$(
eval echo
$*
)
# force default CMD env expansion
hugo
$(
eval echo
$*
)
# force default CMD env expansion
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment