Commit
+64 -0 +/-2 browse
1 | diff --git a/README.md b/README.md |
2 | index b7bf4d0..85a5658 100644 |
3 | --- a/README.md |
4 | +++ b/README.md |
5 | @@ -86,6 +86,16 @@ cargo run -- \ |
6 | --bucket foobar |
7 | ``` |
8 | |
9 | + If you just need to use the local disk as the backend, use the following bash. |
10 | + |
11 | + ```bash |
12 | + # Change this to the output of `openssl rand -hex 32`. |
13 | + export RUDOLFS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
14 | + |
15 | + |
16 | + cargo run -- --port 8080 local --path=/data |
17 | + ``` |
18 | + |
19 | **Note**: Always use a different S3 bucket, cache directory, and encryption key |
20 | than what you use in your production environment. |
21 | |
22 | @@ -119,6 +129,12 @@ To run in a production environment, it is easiest to use `docker-compose`: |
23 | |
24 | ```bash |
25 | docker-compose up -d |
26 | + |
27 | + # use minio yml |
28 | + docker-compose -f ./docker-compose.minio.yml up -d |
29 | + |
30 | + # use local disk yml |
31 | + docker-compose -f ./docker-compose.local.yml up -d |
32 | ``` |
33 | |
34 | 3. **[Optional]**: It is best to use nginx as a reverse proxy for this server. |
35 | diff --git a/docker-compose.local.yml b/docker-compose.local.yml |
36 | new file mode 100644 |
37 | index 0000000..81bfb35 |
38 | --- /dev/null |
39 | +++ b/docker-compose.local.yml |
40 | @@ -0,0 +1,48 @@ |
41 | + # Copy this file to another location and modify as necessary. |
42 | + version: '3' |
43 | + services: |
44 | + app: |
45 | + image: jasonwhite0/rudolfs:latest |
46 | + #build: |
47 | + # context: . |
48 | + # dockerfile: Dockerfile |
49 | + ports: |
50 | + - "8081:8080" |
51 | + volumes: |
52 | + - data:/data |
53 | + restart: always |
54 | + environment: |
55 | + - AWS_ACCESS_KEY_ID |
56 | + - AWS_SECRET_ACCESS_KEY |
57 | + - AWS_DEFAULT_REGION |
58 | + - LFS_ENCRYPTION_KEY |
59 | + - LFS_S3_BUCKET |
60 | + - LFS_MAX_CACHE_SIZE |
61 | + entrypoint: |
62 | + - /tini |
63 | + - -- |
64 | + - /rudolfs |
65 | + - --cache-dir |
66 | + - /data |
67 | + - --key |
68 | + - ${LFS_ENCRYPTION_KEY} |
69 | + - --port |
70 | + - "8080" |
71 | + - local |
72 | + - --path=/data |
73 | + |
74 | + # A real production server should use nginx. How to configure this depends on |
75 | + # your needs. Use your Google-search skills to configure this correctly. |
76 | + # |
77 | + # nginx: |
78 | + # image: nginx:stable |
79 | + # ports: |
80 | + # - 80:80 |
81 | + # - 443:443 |
82 | + # volumes: |
83 | + # - ./nginx.conf:/etc/nginx/nginx.conf |
84 | + # - ./nginx/errors.log:/etc/nginx/errors.log |
85 | + |
86 | + |
87 | + volumes: |
88 | + data: |