From 6c196846d6d20386975f4ee9c0939313569d80c9 Mon Sep 17 00:00:00 2001 From: aidewoode Date: Wed, 27 Nov 2024 21:30:44 +0800 Subject: [PATCH 1/2] Add gcompat to the Dockerfile to make thruster work Related issue: https://github.com/basecamp/thruster/issues/54 --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b1fbc52c..d41a651c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,15 +5,12 @@ FROM base AS builder ENV RAILS_ENV production ENV NODE_ENV production -# Build for musl-libc, not glibc (see https://github.com/sparklemotion/nokogiri/issues/2075, https://github.com/rubygems/rubygems/issues/3174) -ENV BUNDLE_FORCE_RUBY_PLATFORM 1 - COPY --from=node /usr/local/bin/node /usr/local/bin/node COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm -RUN apk add --no-cache tzdata libpq-dev build-base +RUN apk add --no-cache tzdata libpq-dev build-base gcompat WORKDIR /app @@ -21,6 +18,7 @@ COPY Gemfile* /app/ RUN bundle config --local without 'development test' \ && bundle install -j4 --retry 3 \ + && bundle exec bootsnap precompile --gemfile app/ lib/ \ && bundle clean --force \ && rm -rf /usr/local/bundle/cache \ && find /usr/local/bundle/gems/ -name "*.c" -delete \ @@ -45,11 +43,12 @@ RUN apk add --no-cache \ libpq \ vips \ ffmpeg \ - curl + curl \ + gcompat WORKDIR /app -EXPOSE 3000 +EXPOSE 80 RUN addgroup -g 1000 -S app && adduser -u 1000 -S app -G app From 103c677d87a52df28070da249a786c5856dbee99 Mon Sep 17 00:00:00 2001 From: aidewoode Date: Wed, 27 Nov 2024 21:35:01 +0800 Subject: [PATCH 2/2] Update the README about change of default port --- docs/README_EDGE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/README_EDGE.md b/docs/README_EDGE.md index ec4a2d04..eafbb7d7 100644 --- a/docs/README_EDGE.md +++ b/docs/README_EDGE.md @@ -24,13 +24,13 @@ Please visit and use demo user (email: admin@admin Black Candy uses docker image to install easily. You can run Black Candy like this. ```shell -docker run -p 3000:3000 ghcr.io/blackcandy-org/blackcandy:latest +docker run -p 80:80 ghcr.io/blackcandy-org/blackcandy:latest # Or pull from Docker Hub. -docker run -p 3000:3000 blackcandy/blackcandy:latest +docker run -p 80:80 blackcandy/blackcandy:latest ``` -That's all. Now, you can access either http://localhost:3000 or http://host-ip:3000 in a browser, and use initial admin user to log in (email: admin@admin.com, password: foobar). +That's all. Now, you can access either http://localhost or http://host-ip in a browser, and use initial admin user to log in (email: admin@admin.com, password: foobar). ## Upgrade @@ -71,10 +71,10 @@ For Android app, you can also download APK from [GitHub Release](https://github. ### Port Mapping -Black Candy exports the 3000 port. If you want to be able to access it from the host, you can use the `-p` option to map the port. +Black Candy exports the 80 port. If you want to be able to access it from the host, you can use the `-p` option to map the port. ```shell -docker run -p 3000:3000 ghcr.io/blackcandy-org/blackcandy:latest +docker run -p 3000:80 ghcr.io/blackcandy-org/blackcandy:latest ``` ### Media Files Mounts