Compare commits

...

4 commits
main ... v0.2.x

Author SHA1 Message Date
asonix 40b8ed8c85 Version v0.2.6-r2 2021-04-02 13:50:54 -05:00
asonix ad44886b40 Remove imagemagick policy slowdowns 2021-04-02 13:50:03 -05:00
asonix 767f759c08 Version v0.2.6-r1 2021-03-10 16:08:44 -06:00
asonix 949698f8d1 Add imagemagick policy file for docker
Add note about imagemagick policy to readme
2021-03-10 16:07:09 -06:00
7 changed files with 53 additions and 2 deletions

View file

@ -4,7 +4,7 @@ _a simple image hosting service_
## Usage
### Running
```
pict-rs 0.2.0-alpha.3
pict-rs 0.2.6
USAGE:
pict-rs [FLAGS] [OPTIONS] --path <path>
@ -54,6 +54,11 @@ $ wget https://git.asonix.dog/asonix/pict-rs/raw/branch/master/docker/prod/docke
$ sudo docker-compose up -d
```
###### Note
- pict-rs makes use of the system's temporary folder. This is generally `/tmp` on linux
- pict-rs makes use of a default imagemagick security policy at
`/usr/local/lib/ImageMagick-$VERSION/config-Q16HDRI/policy.xml`
#### Docker Development
The development system loads a rust environment inside a docker container with the neccessary
dependencies already present

View file

@ -0,0 +1,20 @@
<policymap>
<policy domain="resource" name="memory" value="256MiB" />
<policy domain="resource" name="list-length" value="32" />
<policy domain="resource" name="width" value="10KP" />
<policy domain="resource" name="height" value="10KP" />
<policy domain="resource" name="map" value="512MiB" />
<policy domain="resource" name="area" value="16KP" />
<policy domain="resource" name="disk" value="1GiB" />
<policy domain="resource" name="file" value="768" />
<policy domain="resource" name="thread" value="2" />
<policy domain="coder" rights="none" pattern="*" />
<policy domain="coder" rights="read | write" pattern="{GIF,JPEG,PNG,WEBP}" />
<policy domain="filter" rights="none" pattern="*" />
<policy domain="path" rights="none" pattern="@*" />
<policy domain="delegate" rights="none" pattern="*" />
<policy domain="module" rights="none" pattern="*" />
<policy domain="module" rights="read | write" pattern="{GIF,JPEG,PNG,WEBP}" />
<!-- indirect reads not permitted -->
<policy domain="system" name="precision" value="6" />
</policymap>

View file

@ -219,6 +219,8 @@ ENV \
RUN \
chown pictrs:pictrs /mnt
COPY root/ /
VOLUME /mnt
WORKDIR /opt/pict-rs
USER pictrs

View file

@ -220,6 +220,8 @@ ENV \
RUN \
chown pictrs:pictrs /mnt
COPY root/ /
VOLUME /mnt
WORKDIR /opt/pict-rs
USER pictrs

View file

@ -220,6 +220,8 @@ ENV \
RUN \
chown pictrs:pictrs /mnt
COPY root/ /
VOLUME /mnt
WORKDIR /opt/pict-rs
USER pictrs

View file

@ -2,7 +2,7 @@ version: '3.3'
services:
pictrs:
image: asonix/pictrs:v0.2.6-r0
image: asonix/pictrs:v0.2.6-r2
ports:
- "127.0.0.1:8080:8080"
restart: always

View file

@ -0,0 +1,20 @@
<policymap>
<policy domain="resource" name="memory" value="256MiB" />
<policy domain="resource" name="list-length" value="32" />
<policy domain="resource" name="width" value="10KP" />
<policy domain="resource" name="height" value="10KP" />
<policy domain="resource" name="map" value="512MiB" />
<policy domain="resource" name="area" value="16KP" />
<policy domain="resource" name="disk" value="1GiB" />
<policy domain="resource" name="file" value="768" />
<policy domain="resource" name="thread" value="2" />
<policy domain="coder" rights="none" pattern="*" />
<policy domain="coder" rights="read | write" pattern="{GIF,JPEG,PNG,WEBP}" />
<policy domain="filter" rights="none" pattern="*" />
<policy domain="path" rights="none" pattern="@*" />
<policy domain="delegate" rights="none" pattern="*" />
<policy domain="module" rights="none" pattern="*" />
<policy domain="module" rights="read | write" pattern="{GIF,JPEG,PNG,WEBP}" />
<!-- indirect reads not permitted -->
<policy domain="system" name="precision" value="6" />
</policymap>