2018-07-12 05:30:13 +02:00
|
|
|
This assumes that you have Docker and Docker Compose already installed.
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
### Prepare things
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
1. Getting `szurubooru`:
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2016-04-01 18:45:25 +02:00
|
|
|
```console
|
2018-07-12 05:30:13 +02:00
|
|
|
user@host:~$ git clone https://github.com/rr-/szurubooru.git szuru
|
|
|
|
user@host:~$ cd szuru
|
2018-07-06 01:25:08 +02:00
|
|
|
```
|
2018-07-12 05:30:13 +02:00
|
|
|
2. Configure the application:
|
2018-07-06 01:25:08 +02:00
|
|
|
|
|
|
|
```console
|
2018-07-12 05:30:13 +02:00
|
|
|
user@host:szuru$ cp server/config.yaml.dist config.yaml
|
|
|
|
user@host:szuru$ edit config.yaml
|
2016-04-01 18:45:25 +02:00
|
|
|
```
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2016-04-21 10:25:46 +02:00
|
|
|
Pay extra attention to these fields:
|
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
- secret
|
2016-04-21 10:25:46 +02:00
|
|
|
- the `smtp` section.
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
You can omit lines when you want to use the defaults of that field.
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
3. Configure Docker Compose:
|
2016-04-02 14:13:26 +02:00
|
|
|
|
|
|
|
```console
|
2018-07-12 05:30:13 +02:00
|
|
|
user@host:szuru$ cp docker-compose.yml.example docker-compose.yml
|
|
|
|
user@host:szuru$ edit docker-compose.yml
|
2016-04-02 14:13:26 +02:00
|
|
|
```
|
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
Read the comments to guide you. For production use, it is *important*
|
|
|
|
that you configure the volumes appropriately to avoid data loss.
|
2017-01-21 00:08:29 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
### Running the Application
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
1. Configurations for ElasticSearch:
|
2018-07-06 01:25:08 +02:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
You may need to raise the `vm.max_map_count`
|
|
|
|
parameter to at least `262144` in order for the
|
|
|
|
ElasticSearch container to function. Instructions
|
|
|
|
on how to do so are provided
|
|
|
|
[here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-prod-mode).
|
2016-03-28 01:12:47 +02:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
2. Build or update the containers:
|
2016-03-28 01:12:47 +02:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
```console
|
|
|
|
user@host:szuru$ docker-compose pull
|
|
|
|
user@host:szuru$ docker-compose build --pull
|
|
|
|
```
|
2017-01-21 00:08:29 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
This will build both the frontend and backend containers, and may take
|
|
|
|
some time.
|
2016-03-28 01:12:47 +02:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
3. Start and stop the the application
|
2017-01-21 00:08:29 +01:00
|
|
|
|
2018-07-12 05:30:13 +02:00
|
|
|
```console
|
|
|
|
# To start:
|
|
|
|
user@host:szuru$ docker-compose up -d
|
|
|
|
# To monitor (CTRL+C to exit):
|
|
|
|
user@host:szuru$ docker-compose logs -f
|
|
|
|
# To stop
|
|
|
|
user@host:szuru$ docker-compose down
|
|
|
|
```
|