mirror of
https://github.com/lone-cloud/prism
synced 2026-06-03 08:43:10 -07:00
fix dockerfile
This commit is contained in:
parent
fed33b9c00
commit
332af80673
6 changed files with 32 additions and 9 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
server/node_modules
|
||||
proton-bridge/node_modules
|
||||
node_modules
|
||||
16
README.md
16
README.md
|
|
@ -112,10 +112,22 @@ Your phone will now receive Signal notifications when ProtonMail receives new em
|
|||
|
||||
### Development
|
||||
|
||||
For local development, use the dev compose file to build from source:
|
||||
For local development, install Bun and signal-cli:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.dev.yml up -d
|
||||
# Install Bun (use your package manager and this is a backup)
|
||||
curl -fsSL https://bun.sh/install | bash
|
||||
|
||||
git clone https://github.com/lone-cloud/sup.git
|
||||
cd sup
|
||||
|
||||
bun install
|
||||
```
|
||||
|
||||
Then build and run with docker-compose.dev.yml:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.dev.yml --profile protonmail up -d
|
||||
```
|
||||
|
||||
Or run services directly with Bun:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
services:
|
||||
sup-server:
|
||||
build: ./server
|
||||
build:
|
||||
context: .
|
||||
dockerfile: server/Dockerfile
|
||||
ports:
|
||||
- '8080:8080'
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ const config =
|
|||
: { name: 'sup-proton-bridge', path: './proton-bridge' };
|
||||
|
||||
try {
|
||||
// Read version from package.json
|
||||
const packageJson = await Bun.file(`${config.path}/package.json`).json();
|
||||
const version = `v${packageJson.version}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,19 +2,25 @@ FROM oven/bun:1.1.42-alpine AS builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock* ./
|
||||
COPY server/package.json server/bun.lock* ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
COPY server .
|
||||
|
||||
RUN bun build --compile src/server.ts --outfile sup-server
|
||||
RUN bun build --compile index.ts --outfile sup-server
|
||||
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN apk add --no-cache openjdk21-jre
|
||||
ARG SIGNAL_CLI_VERSION=0.13.22
|
||||
|
||||
RUN apk add --no-cache openjdk21-jre curl libstdc++ libgcc
|
||||
|
||||
RUN curl -L https://github.com/AsamK/signal-cli/releases/download/v${SIGNAL_CLI_VERSION}/signal-cli-${SIGNAL_CLI_VERSION}.tar.gz | tar xz -C /tmp \
|
||||
&& mv /tmp/signal-cli-${SIGNAL_CLI_VERSION} /usr/local/signal-cli
|
||||
|
||||
COPY --from=builder /app/sup-server /usr/local/bin/sup-server
|
||||
COPY --from=builder /app/signal-cli /usr/local/bin/signal-cli
|
||||
|
||||
ENV PATH="/usr/local/signal-cli/bin:${PATH}"
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
"chalk": "^5.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "bun run ../scripts/install-signal-cli.ts || true",
|
||||
"dev": "bun --watch index.ts",
|
||||
"start": "bun run index.ts",
|
||||
"build": "bun build --compile index.ts --outfile sup-server",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue