diff --git a/command/src/main.rs b/command/src/main.rs index 1290fdb4..fc7750a9 100644 --- a/command/src/main.rs +++ b/command/src/main.rs @@ -186,8 +186,8 @@ fn prompt_for_optional_services() -> Result, Error> { compose_profile: Some(ComposeProfile::Thumbnails), repositories: None, }, - "Thumbnail generator", - "for resizing blog/streamer images", + "Image uploads + thumbnails", + "for blog/coach/streamer images", ) .item( OptionalService { diff --git a/conf/lila.original.conf b/conf/lila.original.conf index 5df9459f..b75808a8 100644 --- a/conf/lila.original.conf +++ b/conf/lila.original.conf @@ -17,7 +17,7 @@ game.gifUrl = "http://lila_gif:6175" search.enabled = true search.endpoint = "http://lila_search:9673" -memo.picfit.endpointGet = "http://picfit:3001" +memo.picfit.endpointGet = "http://localhost:3001" memo.picfit.endpointPost = "http://picfit:3001" mailer.primary.mock = false diff --git a/conf/nginx.conf b/conf/nginx.conf index 3c617fd9..59018d36 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,6 +3,7 @@ server { listen [::]:80; server_name lichess; + client_max_body_size 4M; root /lila/public; location /assets/lifat { diff --git a/conf/picfit.json b/conf/picfit.json new file mode 100644 index 00000000..018021f5 --- /dev/null +++ b/conf/picfit.json @@ -0,0 +1,13 @@ +{ + "debug": true, + "port": 3001, + "options": { + "enable_upload": true + }, + "storage": { + "src": { + "type": "fs", + "location": "/uploads/" + } + } +} diff --git a/docker-compose.yml b/docker-compose.yml index d4bbadcd..b721c85b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -219,6 +219,8 @@ services: - 3001:3001 networks: - lila-network + volumes: + - ./conf/picfit.json:/mnt/config.json profiles: - thumbnails diff --git a/docker/picfit.Dockerfile b/docker/picfit.Dockerfile index 07c30abd..d1d65939 100644 --- a/docker/picfit.Dockerfile +++ b/docker/picfit.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.3-alpine3.18 +FROM golang:1.21.4-alpine3.18 RUN apk add git make @@ -7,6 +7,4 @@ WORKDIR /opt RUN git clone --depth 1 https://github.com/thoas/picfit.git RUN make -C /opt/picfit build -RUN echo '{"port": 3001}' > /opt/config.json - -ENTRYPOINT /opt/picfit/bin/picfit -c /opt/config.json +ENTRYPOINT /opt/picfit/bin/picfit -c /mnt/config.json diff --git a/lila-docker b/lila-docker index d9ab428f..ba5f748e 100755 --- a/lila-docker +++ b/lila-docker @@ -53,6 +53,7 @@ run_setup_config() { if [ ! -z "$GITPOD_WORKSPACE_ID" ]; then echo "Replacing localhost URLs with Gitpod URLs..." find ./conf/lila.conf ./conf/lila-ws.conf -type f -exec sed -i "s/http:\/\/localhost:8080/$(gp url 8080 | sed 's/\//\\\//g')/g" {} \; + find ./conf/lila.conf ./conf/lila-ws.conf -type f -exec sed -i "s/http:\/\/localhost:3001/$(gp url 3001 | sed 's/\//\\\//g')/g" {} \; find ./conf/lila.conf ./conf/lila-ws.conf -type f -exec sed -i "s/localhost:8080/$(gp url 8080 | cut -c9-)/g" {} \; fi }