Absolutely blowing things up on the way to docker-compose setup
This commit is contained in:
parent
20ed2d29b1
commit
fa6a2e120e
14
.drone.yml
14
.drone.yml
@ -1,17 +1,3 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
steps:
|
||||
- name: Deploy Autonomic.zone with Dokku
|
||||
image: appleboy/drone-git-push:0.2.0-linux-amd64
|
||||
settings:
|
||||
remote: ssh://dokku@dokku.autonomic.zone:222/autonomic.zone
|
||||
ssh_key:
|
||||
from_secret: drone_deploy_key
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: deploy to swarm.autonomic.zone
|
||||
|
@ -13,11 +13,7 @@ with.
|
||||
[writing posts]: https://jekyllrb.com/docs/posts/
|
||||
[creating pages]: https://jekyllrb.com/docs/pages/
|
||||
|
||||
## Deploy It
|
||||
|
||||
Just push your changes to master and it will be deploy. See [Drone](https://drone.autonomic.zone/autonomic-cooperative/autonomic.zone/) for more.
|
||||
|
||||
## Hack On It
|
||||
## Development
|
||||
|
||||
The prerequisites are [Docker](https://www.docker.com/) and [Docker-compose](https://docs.docker.com/compose/).
|
||||
|
||||
@ -56,9 +52,6 @@ To stop the container when you're done, you can run:
|
||||
$ docker-compose stop
|
||||
```
|
||||
|
||||
## Notes
|
||||
## Production
|
||||
|
||||
1. For configuration, please note, we now use a `dev` environment config file:
|
||||
`_config_dev.yml`. Hence if you edit one `_config*` file and you also want
|
||||
that change to be reflected in the other environment ("dev", "prod") then
|
||||
edit the other file as well!
|
||||
TODO.
|
||||
|
15
Dockerfile
15
Dockerfile
@ -1,15 +0,0 @@
|
||||
FROM decentral1se/jekyll:4
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
COPY sbin/* /sbin/
|
||||
|
||||
RUN bundle config --global frozen 1
|
||||
|
||||
RUN bundle install
|
||||
|
||||
ENTRYPOINT ["/sbin/entrypoint.sh"]
|
26
Makefile
26
Makefile
@ -1,26 +0,0 @@
|
||||
IMG := autonomic/autonomic.zone
|
||||
NAME := autonomic-zone-testing
|
||||
PORT := 4000
|
||||
TAG := testing
|
||||
|
||||
build:
|
||||
@docker build -t $(IMG):$(TAG) .
|
||||
.PHONY: build
|
||||
|
||||
stop:
|
||||
@docker stop $(NAME) && docker rm $(NAME) --force
|
||||
.PHONY: stop
|
||||
|
||||
serve:
|
||||
@docker run \
|
||||
--name $(NAME) \
|
||||
-e JEKYLL_PORT=$(PORT) \
|
||||
-e JEKYLL_HOST=0.0.0.0 \
|
||||
-e JEKYLL_CONFIG=_config_dev.yml \
|
||||
-e JEKYLL_ENV=development \
|
||||
-v $$(pwd):/usr/src/app \
|
||||
-p $(PORT):$(PORT) \
|
||||
-d \
|
||||
$(IMG):$(TAG) && \
|
||||
echo "Site available at http://localhost:4000"
|
||||
.PHONY: serve
|
@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Autonomic Co-operative
|
||||
email: helo@autonomic.zone
|
||||
description: Sustainability, Transparency, Privacy
|
||||
baseurl: ""
|
||||
url: ""
|
||||
source: src
|
||||
destination: dist
|
||||
sass:
|
||||
sass_dir: ./assets/styles
|
||||
featured-image-source:
|
||||
mastodon_url: https://sunbeam.city/@autonomic
|
||||
twitter_url: https://twitter.com/autonomiccoop
|
||||
gitea_url: https://git.autonomic.zone/autonomic-cooperative/
|
||||
markdown: kramdown
|
||||
permalink: pretty
|
||||
collections:
|
||||
posts:
|
||||
output: true
|
||||
permalink: /blog/:title/
|
||||
clients:
|
||||
output: false
|
||||
exclude:
|
||||
- vendor
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
plugins:
|
||||
- jekyll-feed
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
vars:
|
||||
port: "4000"
|
||||
domain: "autonomic.zone"
|
||||
|
||||
env:
|
||||
DOKKU_LETSENCRYPT_EMAIL: "helo@autonomic.zone"
|
||||
JEKYLL_CONFIG: "_config_prod.yml"
|
||||
JEKYLL_ENV: "production"
|
||||
JEKYLL_HOST: "0.0.0.0"
|
||||
JEKYLL_PORT: "4000"
|
@ -8,7 +8,7 @@ services:
|
||||
--watch \
|
||||
--force_polling \
|
||||
--verbose \
|
||||
--config _config_dev.yml \
|
||||
--config _config.yml \
|
||||
--trace
|
||||
volumes:
|
||||
- ".:/srv/jekyll"
|
||||
|
@ -6,17 +6,10 @@ services:
|
||||
command: >
|
||||
jekyll serve \
|
||||
--verbose \
|
||||
--config /srv/jekyll/_config_prod.yml \
|
||||
--config _config.yml \
|
||||
--trace
|
||||
configs:
|
||||
- source: config-yml-prod-v1
|
||||
target: /srv/jekyll/_config_prod.yml
|
||||
networks:
|
||||
- proxy
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./
|
||||
target: /srv/jekyll
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
@ -35,7 +28,3 @@ services:
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
configs:
|
||||
config-yml-prod-v1:
|
||||
file: _config_prod.yml
|
||||
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
# Fire up Jekyll with the right configuration
|
||||
run_jekyll() {
|
||||
set -eu
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
local args="--config $JEKYLL_CONFIG --trace --verbose"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
bundle exec jekyll build $args
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
local args="${args} --host $JEKYLL_HOST --port $JEKYLL_PORT"
|
||||
|
||||
if [[ $JEKYLL_ENV == "development" ]]; then
|
||||
# shellcheck disable=SC2155
|
||||
local args="${args} --incremental"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
bundle exec jekyll serve $args
|
||||
}
|
||||
|
||||
# Main entrypoint
|
||||
main() {
|
||||
set -eu
|
||||
|
||||
run_jekyll
|
||||
}
|
||||
|
||||
main
|
Reference in New Issue
Block a user