Merge branch 'main' into release1.0
This commit is contained in:
commit
b6cfac63a4
17
README.MD
17
README.MD
|
@ -14,7 +14,20 @@ The playbook includes nginx role and deploys entire stack needed to run Cstate.
|
||||||
|
|
||||||
## Guide
|
## Guide
|
||||||
|
|
||||||
If you don't provide your own already-built site (with `cstate_repo` in `defaults/main.yml`), then the role uses the cstate example repo to build one. You may then deploy your site by copying the `share/public/` directory to your production web server.
|
### First deployment
|
||||||
|
At first, the role uses the cstate example repo to build a website.
|
||||||
|
|
||||||
|
You can modify the look by changing vars in the `defaults/main.yml` file and also by adding your own logo in `/files`. Then use `ansible-playbook -b Playbooks/cstate.yml --tags config --tags generate` to build the pages and check them on http://192.168.33.20 if your using Vagrant.
|
||||||
|
|
||||||
|
### Upload on your own git repo
|
||||||
|
Once you're satisfied with the look of your site, remove the files in `/content/issues/` and in `public/issues/` as they're the default issues pages used as demo.
|
||||||
|
|
||||||
|
You may now deploy it on your own git repo: copy the content of `/var/www/cstate` on your repo (if using Vagrant, you can also copy the content of the `share` synced folder).
|
||||||
|
|
||||||
|
### Create issues
|
||||||
|
If you have uploaded the content of `/var/www/cstate` on your repo, add your repo address in the `cstate_repo` var in `defaults/main.yml` file.
|
||||||
|
|
||||||
|
You can create issues files inside `/var/www/cstate/content/issues/` folder on your host (or in `/share/content/issues/` if your using Vagrant with the `share` synced folder). Then use `ansible-playbook -b Playbooks/cstate.yml --tags generate` to build those pages in the `public/` directory. The folder public can now be hosted on the production web server.
|
||||||
|
|
||||||
Once done, you can create issues files inside the `share/content/issues/` folder on your host. Then use `ansible-playbook -b Playbooks/cstate.yml --tags generate` to build those page in the `public/` directory. You can also have a **custom content repository** instead. Set `cstate_content_init` to `true` and `cstate_content_repo` to your content repo.
|
Once done, you can create issues files inside the `share/content/issues/` folder on your host. Then use `ansible-playbook -b Playbooks/cstate.yml --tags generate` to build those page in the `public/` directory. You can also have a **custom content repository** instead. Set `cstate_content_init` to `true` and `cstate_content_repo` to your content repo.
|
||||||
|
|
||||||
|
@ -23,7 +36,7 @@ If you update the config file and want to generate new pages, you can run `ansib
|
||||||
To update cstate just include `--tags update` to your playbook.
|
To update cstate just include `--tags update` to your playbook.
|
||||||
|
|
||||||
## Issue with vagrant
|
## Issue with vagrant
|
||||||
You may have to add `sendfile off;` to your Nginx config when using the role with Vagrant and a shared folder. See [info](https://www.vagrantup.com/docs/synced-folders/virtualbox)
|
You may have to add `sendfile off;` to your Nginx config when using the role with Vagrant and a synced folder. See [info](https://www.vagrantup.com/docs/synced-folders/virtualbox)
|
||||||
|
|
||||||
## CHANGELOG
|
## CHANGELOG
|
||||||
- **06.05.2023** - Add custom content repository
|
- **06.05.2023** - Add custom content repository
|
||||||
|
|
3
Vagrantfile
vendored
3
Vagrantfile
vendored
|
@ -16,6 +16,7 @@ Vagrant.configure("2") do |config|
|
||||||
cstate.vm.network "forwarded_port", guest: 443, host: 4444, host_ip: "192.168.33.20"
|
cstate.vm.network "forwarded_port", guest: 443, host: 4444, host_ip: "192.168.33.20"
|
||||||
cstate.vm.network "forwarded_port", guest: 8080, host: 8081, host_ip: "192.168.33.20"
|
cstate.vm.network "forwarded_port", guest: 8080, host: 8081, host_ip: "192.168.33.20"
|
||||||
cstate.vm.network "private_network", ip: "192.168.33.20"
|
cstate.vm.network "private_network", ip: "192.168.33.20"
|
||||||
# cstate.vm.synced_folder "share", "/var/www/cstate", owner: "www-data", group: "www-data"
|
#cstate.vm.synced_folder "share", "/var/www/cstate", owner: "www-data", group: "www-data"
|
||||||
|
config.vm.provision "shell", inline: "apt install acl"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
include: installdeps.yml
|
include_tasks: installdeps.yml
|
||||||
|
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
include: git.yml
|
include_tasks: git.yml
|
||||||
|
|
||||||
- name: Set personal config
|
- name: Set personal config
|
||||||
include: config.yml
|
include_tasks: config.yml
|
||||||
|
tags: config
|
||||||
|
|
||||||
- name: Build webpages with hugo
|
- name: Build webpages with hugo
|
||||||
include: generate.yml
|
include_tasks: generate.yml
|
||||||
tags:
|
tags:
|
||||||
- configfile
|
- configfile
|
||||||
- generate
|
- generate
|
||||||
|
|
||||||
- name: Update
|
- name: Update
|
||||||
include: update.yml
|
include_tasks:: update.yml
|
||||||
tags:
|
tags:
|
||||||
- update
|
- update
|
||||||
- never
|
- never
|
||||||
|
|
Loading…
Reference in a new issue