Commit 87a6f68d authored by Johannes Winter's avatar Johannes Winter
Browse files

merge

parents 00e4cce6 39d7e5ec
Loading
Loading
Loading
Loading
Loading

.env

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
BUILDPACK_URL=https://github.com/ecobytes/buildpack-nginx.git

.gitlab-ci.yml

0 → 100644
+85 −0
Original line number Diff line number Diff line
stages:
  - build
  - deploy
  - build-prod
  - deploy-prod

variables:
  NAME: "anonymous"
  EMAIL: "status@ecobytes.net"

build-dev:
  image: jguyomard/hugo-builder
  stage: build
  only:
    - master
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
    HUGO_BASEURL: http://$APP_NAME_DEV.dokku.ecobytes.net/
  script:
    - hugo
  artifacts:
    paths:
      - public/

deploy-dev:
  image: alpine
  stage: deploy
  environment:
    name: development
    url: http://$APP_NAME_DEV.dokku.ecobytes.net/
  only:
    - master
  before_script:
    - apk add --no-cache git openssh
    - mkdir -p ~/.ssh
    - echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
    - chmod 600 ~/.ssh/id_rsa
    - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
  script:
    - cd public
    - git init
    - git add -A .
    - git commit -m runner
    - git remote add dokku dokku@dokku.ecobytes.net:$APP_NAME_DEV
    - git push -vv dokku +master

build-prod:
  image: jguyomard/hugo-builder
  stage: build-prod
  when: manual
  allow_failure: false
  only:
    - master
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
    - hugo -b https://$APP_NAME/
  dependencies: []
  artifacts:
    paths:
      - public/

deploy-prod:
  image: alpine
  stage: deploy-prod
  environment:
    name: production
    url: $APP_NAME
  only:
    - master
  dependencies:
    - build-prod
  before_script:
    - apk add --no-cache git openssh
    - mkdir -p ~/.ssh
    - echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
    - chmod 600 ~/.ssh/id_rsa
    - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
  script:
    - cd public
    - git init
    - git add -A .
    - git commit -m runner
    - git remote add dokku dokku@dokku.ecobytes.net:$APP_NAME
    - git push -vv dokku +master
+1 −4
Original line number Diff line number Diff line
[submodule "themes/detox"]
	path = themes/detox
	url = https://lab.allmende.io/solidbase/website-theme.git 
[submodule "public"]
	path = public
	url = dokku@apps.allmende.io:solidbase.info
	url = ../website-theme.git 

LICENSE

0 → 100644
+674 −0

File added.

Preview size limit exceeded, changes collapsed.

+15 −8
Original line number Diff line number Diff line
@@ -4,22 +4,29 @@ This is the source code for [`solidbase.info`](https://solidbase.info).

## Dependencies

- Hugo Extended
  i.e. as a Snap package https://gohugo.io/getting-started/installing/#linux
- Node.js, ideally via nvm.sh
- [Hugo](https://gohugo.io/getting-started/installing/)
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

## Submodules
## Run locally

```
git clone git@lab.allmende.io:solidbase/learn.git
cd learn
git submodule sync
git submodule update --init --recursive --remote
hugo serve
```

## Deployment

```
./deploy
```
This repo uses [gitlab CI/CD](https://docs.gitlab.com/ce/ci/#exploring-gitlab-ci-cd) for deployment to [dokku](http://dokku.viewdocs.io/dokku/). See the [pipeline configuration](https://lab.allmende.io/solidbase/website/blob/master/.gitlab-ci.yml) for details.  
The following Variables needs to be set as under `Settings->CI/CD->Variables`:

- `APP_NAME_DEV`:  The SLD name for the *staging instance*, which will become accessible under `$APP_NAME_DEV.dokku.ecobytes.net`
- `APP_NAME`: A fqdn for the *production instance*
- `SSH_PRIVATE_KEY`: A key for the dokku, defined as project wide variable

Deployment to *production* needs to be maually triggered in the pipeline view.

## Authors

@@ -28,4 +35,4 @@ git submodule update --init --recursive --remote

## License

CC0
[GPL3](LICENSE)
Loading