Skip to content

Commit

Permalink
Merge pull request #399 from blackcandy-org/thruster
Browse files Browse the repository at this point in the history
Fix the issue of thruster not working in Docker image
  • Loading branch information
aidewoode authored Nov 27, 2024
2 parents 48365ab + 103c677 commit dd86df5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@ 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

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 \
Expand All @@ -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

Expand Down
10 changes: 5 additions & 5 deletions docs/README_EDGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Please visit <https://demo.blackcandy.org> 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: [email protected], 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: [email protected], password: foobar).

## Upgrade

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dd86df5

Please sign in to comment.