readme.md 1.68 KB
Newer Older
Aral Balkan's avatar
Aral Balkan committed
1
2
3
# Blockdown Builder

Builds the blockdown data from the blockdown content.
4

5
### Development
6

7
	./install
8

9
To use, run:
10

11
	./dev
12

13
### Production
14

15
(I’m sorry there isn’t a more automated process at the moment. Configuration of the deployment environment involves the manual set up and configuration of a number of servers and Git repositories at the moment.)
16
17

1. Set up server with Dokku.
18

19
2. Copy `config.coffee` into `~/ind.ie.blockdown-builder` (`/root/ind.ie.blockdown-builder/`) and configure it.
20

21
3. In the folder from Step 2, above, `git clone git@source.ind.ie:blockdown/content.git`
22

23
24
4. ./deploy

25
26
27
5. Create the volumes:

		dokku docker-options:add blockdown-builder.ind.ie run "-v /root/ind.ie.blockdown-builder:/app/ind.ie.blockdown-builder"
28

29
30
31
6. Create the data repository:
	i. `cd ~/ind.ie.blockdown-builder/`
	ii. `git clone git@source.ind.ie:blockdown/data.git`
32

33
7. In the data repository: `git remote add site git@blockdown-site.ind.ie:data.git`
34

35
8. Set up post-push and post-merge webhooks on Gitlab for both the Builder and Content repositories to point to `https://url/for/your/installation/build/(token-from-config.coffee)`
36

37
38
39
40
41
42
43
44
45
46
47
48
49
50
9. Add your ssh key for the Blockdown repositories to `~/ind.ie.blockdown-builder/ssh` as `id_rsa` and `id_rsa.pub`.


# Site deployment

For blockdown-site.ind.ie:

1. Create a git account.
2. Add the blockdown-builder.ind.ie SSH keys.
3. In ~, `git init --bare data.git`
4. In ~, `git clone git@source.ind.ie:blockdown/data.git site`
5. From blockdown-builder.ind.ie, make sure you run Step 7, above to add data.git as a remote.
6. From blockdown-builder.ind.ie, `git push site master`
7. Make sure that the post-receive hook is in /home/git/data.git/hooks (see Site repository)