Skip to content

Commit 57ae17b

Browse files
committed
2.4 Docker install guide update
1 parent 7b90337 commit 57ae17b

File tree

1 file changed

+36
-33
lines changed

1 file changed

+36
-33
lines changed

etc/docker/README.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# How to install Superdesk and Publisher with Docker
22

3-
This guide explains how to install complete Superdesk digital publishing system made of Superdesk headless CMS (with the Publisher plugin) and the Publisher, using Docker.
3+
This guide explains how to install a complete Superdesk digital publishing system made of Superdesk headless CMS (with the Publisher plugin) and the Publisher, using Docker.
44

55
## Prerequisites
66

7-
For using Superdesk and Publisher tohetger, the following line must be added the to `hosts` file on local machine, if it doesn't exist:
7+
For using Superdesk and Publisher together, the following line must be added the to the `hosts` file on the local machine, if it doesn't exist:
88

99
```
1010
127.0.0.1 superdesk.local publisher.local
1111
```
1212

1313

14-
Both ```superdesk.local``` and ```publisher.local``` are configured as aliases for appropriate Superdesk and Publisher containers.
14+
Both ```superdesk.local``` and ```publisher.local``` are configured as aliases for respective Superdesk and Publisher containers.
1515

16-
Before continuing, Docker network should be set, if it doesn't exist:
16+
Before continuing, the Docker network should be set, if it doesn't exist:
1717

1818
```bash
1919
docker network create sp-publisher-network
@@ -22,7 +22,7 @@ docker network create sp-publisher-network
2222

2323
## Superdesk
2424

25-
Clone Superdesk with the Publisher plugin repository
25+
Clone Superdesk with the Publisher plugin repository:
2626

2727
``` bash
2828
git clone -b docker https://github.com/superdesk/superdesk-sp
@@ -110,7 +110,7 @@ Execute commands inside ```superdesk-sp``` directory:
110110
cd superdesk-sp
111111
```
112112

113-
Start superdesk using the ```docker-compose.yml``` file:
113+
Start Superdesk using the ```docker-compose.yml``` file:
114114

115115
``` bash
116116
docker-compose up -d
@@ -122,15 +122,22 @@ Finish Superdesk setup:
122122
docker-compose run superdesk-server /opt/superdesk/docker/start.sh
123123
```
124124

125+
After the first start, the Superdesk gets populated with the demo data, which is generally a good idea. However, reinserting demo data will create problems, so after the first ```docker-compose up -d``` run, change the ```DEMO_DATA``` environment variable in ```docker-compose.yml``` to ```0``` for the ```superdesk-server``` container:
126+
127+
```
128+
- DEMO_DATA=0
129+
```
130+
131+
125132
### Post installation
126133

127134
This will install Superdesk with the Publisher plugin and make it available at [superdesk.local:8080](http://superdesk.local:8080).
128135

129-
In order to have it talk to the Publisher, attach to ```superdesk-sp_superdesk-client_1``` container and edit `config.random.js` (ie config.ec23ae24.js).
136+
To have it talk to the Publisher, attach to ```superdesk-sp_superdesk-client_1``` container and edit `config.random.js` (ie config.ec23ae24.js).
130137

131138
```bash
132139
docker exec -it superdesk-sp_superdesk-client_1 bash
133-
apt update && apt -y install nano
140+
apt update && apt -y install nano && nano config.ec23ae24.js
134141
```
135142

136143

@@ -159,13 +166,7 @@ window.superdeskConfig = {
159166
},
160167
};
161168
```
162-
163-
### Restarting containers
164-
After the first start, Superdesk is being populated with demo data, which is generally good idea. However, reinserting demo data will create problems, so after the first ```docker-compose up -d``` run, change demo data environment variable in ```docker-compose.yml``` to ```0``` for the ```superdesk-server``` container:
165-
166-
```
167-
- DEMO_DATA=0
168-
```
169+
This concludes the Superdesk installation and setup, and the Publisher connection. As the Publisher is not yet installed and configured, it won't be available in Superdesk, if you try looking for it at this point. The steps for installing the Publisher are below.
169170

170171

171172
## Publisher
@@ -175,7 +176,7 @@ If you are still in the `superdesk-sp` directory, go one step up
175176
cd ..
176177
```
177178

178-
Clone Publisher repository and move into the `etc/docker` directory
179+
Clone the Publisher repository and move into the `etc/docker` directory
179180

180181
``` bash
181182
git clone -b 2.4 https://github.com/superdesk/web-publisher
@@ -190,7 +191,7 @@ Copy `.env.example` to `.env`:
190191
cp .env.example .env
191192
```
192193

193-
`.env.example` file contains environment variable for having Publisher available at [publisher.local](http://publisher.local), and connected to Superdesk at [superdesk.local:8080](http://superdesk.local:8080) (available in superdesk-client Docker container).
194+
`.env.example` file contains an environment variable for having the Publisher available at [publisher.local](http://publisher.local), and connected to Superdesk at [superdesk.local:8080](http://superdesk.local:8080) (available in superdesk-client Docker container).
194195

195196
Copy `.docker-compose.yml.example` to `.docker-compose.yml.`
196197

@@ -228,11 +229,11 @@ docker-compose run php php bin/console doctrine:database:create
228229
docker-compose run php php bin/console doctrine:migrations:migrate --no-interaction
229230
```
230231

231-
### Tenants and organisation
232+
### Tenants and organization
232233

233-
There are two options:
234-
* Load tenants and organization sample data fixtures
235-
* Setup the tenant manually
234+
There are two options for creating organization and tenants:
235+
* Load sample data fixtures
236+
* Manual setup
236237

237238
#### Load tenants and organization sample data with fixtures
238239

@@ -253,7 +254,7 @@ docker-compose run php php bin/console sylius:theme:assets:install
253254

254255
Skip the next step (Setup the tenant manually)
255256

256-
#### Setup the tenant manually
257+
#### Manual setup
257258

258259
##### Create Elasticsearch indexes
259260

@@ -311,12 +312,12 @@ docker exec docker_php_1 sh -c 'chown -R www-data:www-data /var/www/publisher/va
311312

312313
### Preview
313314

314-
Go to http://publisher.local for viewing the app in dev mode.
315+
Go to http://publisher.local to view the app in dev mode.
315316

316-
### Configure (optional)
317+
### Optional configuration
317318

318319
If you use Docker for Windows, you might need to additionally
319-
change the values of `SWP_DOMAIN` and `CACHE_SERVERS` env vars from `localhost` to `127.0.0.1` in `.env` file.
320+
change the values of `SWP_DOMAIN` and `CACHE_SERVERS` env vars from `localhost` to `127.0.0.1` in the `.env` file.
320321

321322
### Where to see nginx logs?
322323

@@ -328,9 +329,11 @@ change the values of `SWP_DOMAIN` and `CACHE_SERVERS` env vars from `localhost`
328329

329330
## Setting up Superdesk to talk to Publisher
330331

331-
After successfully finishing both installations, there are additional steps in order to have articles being published from Superdesk to Publisher.
332+
After successfully finishing both installations, there are additional steps to have articles published from the Superdesk to the Publisher.
333+
334+
First of all, check if the Superdesk and Publisher are talking to each other, assuming that the Publisher is installed and available at [publisher.local](http://publisher.local): go to the hamburger menu in the upper left corner of the Superdesk interface, and choose Publisher Settings.
332335

333-
First of all, check if Superdesk and Publisher are talking to each other, assuming that the Publisher is installed and available at [publisher.local](http://publisher.local): go to the hamburger menu in the upper left corner, and choose Publisher Settings, Publisher tenant(s) should be listed.
336+
Publisher tenant(s) should be listed.
334337

335338
### Create product
336339

@@ -340,23 +343,23 @@ https://www.youtube.com/watch?v=g_lVOJ5aOzQ
340343

341344
### Create Subscriber
342345

343-
In order to push content from Superdesk to Publisher, a Subscriber must be added with following information (replicate the setup from the video):
346+
To push content from the Superdesk to the Publisher, a Subscriber must be added with the following information (replicate the setup from the video):
344347

345348
**Destination**
346349
* Resource URL: http://publisher.local/api/v2/content/push
347-
* Assest URL: http://publisher.local/api/v2/assets/push
350+
* Asset URL:
348351

349352
https://www.youtube.com/watch?v=wjsVBM88IRg (**this video uses the older version with publisher.local:8080, use publisher.local instead**)
350353

351-
### Create “catch all” publishing rule
354+
### Create a “catch all” publishing rule
352355

353-
After the content is sent to Publisher’s subscriber, Publisher needs a generic rule to “catch” and publish it. Therefore one “catch all” rule should be created.
356+
After the content is sent to the Publisher’s subscriber, the Publisher needs a generic rule to “catch” and publish it. Therefore one “catch all” rule should be created.
354357

355-
In *[Publisher Settings](http://superdesk.local:8080/#/publisher/settings)* (available in the Superdesk "hamburger" menu) choose *Publishing Rules* from the left pane, click *Add new* and choose *Organizational rule*. Name it *catch-all*, switch on *Catch all* toggle, click + button under *Destination (Tenants)*, choose your tenant and click *Save*.
358+
In *[Publisher Settings](http://superdesk.local:8080/#/publisher/settings)* (available in the Superdesk "hamburger" menu) choose *Publishing Rules* from the left pane, click *Add new* and choose *Organizational rule*. Name it *catch-all*, switch on *Catch all* toggle, click + button under *Destination (Tenants)*, choose your tenant, and click *Save*.
356359

357360

358361
### Create and publish an article
359362

360363
https://www.youtube.com/watch?v=UDCZdEfGfHI
361364

362-
This process can be automated by creating publishing rules with category targeting (specific category publishes to specific route). Article flow from Superdesk to Publisher can be monitored in the Publisher Output Control.
365+
This process can be automated by creating publishing rules with category targeting (specific category publishes to the specific route). Article flow from Superdesk to Publisher can be monitored in the Publisher Output Control.

0 commit comments

Comments
 (0)