Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
swh-deposit
==============
There are 2 modes.
# Development like
## Configuration
In ~/.config/swh/deposit/server.yml
``` YAML
# dev option
host: 127.0.0.1
port: 5006
# production
authentication: true
# 20 Mib max size
max_upload_size: 20971520
verbose: false
noop: false
objstorage:
cls: pathslicing
args:
root: /home/storage/swh-deposit/uploads
slicing: 0:1/1:5
```
## Run
Run local server which will use the previous setup.
``` Shell
make run-dev
```
# Production-like
This will run locally a mode similar to that of production.
## Configuration
This expects the same file describes in the previous chapter. Plus,
an additional private settings.yml file containing secret information
that is not in the source code repository.
In ~/.config/swh/deposit/private.yml, something like:
``` YAML
secret_key: production-local
db:
name: swh-deposit-dev
```
## Run
``` Shell
make run
```
Note: This expects gunicorn3 package installed on the system.
## Tests
``` Shell
cd swh && python3 -m manage test
```