-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker - experiment the built of a docker image
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/vendor/ | ||
/output/ | ||
/.git/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM composer:latest | ||
|
||
# to experiment remote storage of public content | ||
RUN curl https://rclone.org/install.sh | bash | ||
|
||
RUN mkdir -p /opt/satis-gitlab | ||
WORKDIR /opt/satis-gitlab | ||
COPY composer.json . | ||
COPY composer.lock . | ||
RUN composer install | ||
|
||
COPY . /opt/satis-gitlab | ||
WORKDIR /opt/satis-gitlab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# satis-gitlab - Usage with docker | ||
|
||
## Motivation | ||
|
||
Provide a docker image to use satis-gitlab to : | ||
|
||
* Create a static site with pages using GitLab-CI or GitHub actions | ||
* Ease the built of a custom image with a custom update loop | ||
* Allow remote storage (like S3) of generated content using [rclone](https://rclone.org/) | ||
|
||
## Build image | ||
|
||
```bash | ||
docker build -t satis-gitlab . | ||
``` | ||
|
||
## Create static site content | ||
|
||
```bash | ||
docker volume create satis-data | ||
docker run -v satis-data:/opt/satis-gitlab/public --env-file=../satis-gitlab.env --rm -ti satis-gitlab /bin/bash | ||
|
||
bin/satis-gitlab gitlab-to-config \ | ||
--homepage https://satis.dev.localhost \ | ||
--output satis.json https://github.com \ | ||
--users=mborne $GITHUB_TOKEN | ||
|
||
git config --global github.accesstoken $GITHUB_TOKEN | ||
bin/satis-gitlab build satis.json public | ||
``` | ||
|
||
## Serve static site content | ||
|
||
```bash | ||
docker run --rm -ti -v satis-data:/usr/share/nginx/html -p 8888:8080 nginxinc/nginx-unprivileged:1.25 | ||
``` | ||
|
||
|