tangled
alpha
login
or
join now
indexx.dev
/
tweets2bsky
forked from
j4ck.xyz/tweets2bsky
0
fork
atom
A simple tool which lets you scrape twitter accounts and crosspost them to bluesky accounts! Comes with a CLI and a webapp for managing profiles! Works with images/videos/link embeds/threads.
0
fork
atom
overview
issues
pulls
pipelines
feat: UPDATE DOCKER AGAIN
Index
4 weeks ago
5b9598ed
0af472b9
+6
-18
1 changed file
expand all
collapse all
unified
split
Dockerfile
+6
-18
Dockerfile
···
1
1
# ── Build stage ──────────────────────────────────────────────────────────────
2
2
FROM node:22-slim AS builder
3
3
4
4
-
# Native build tools for better-sqlite3
5
4
RUN apt-get update && apt-get install -y --no-install-recommends \
6
5
python3 make g++ \
7
6
&& rm -rf /var/lib/apt/lists/*
···
14
13
COPY . .
15
14
RUN npm run build
16
15
16
16
+
# Prune dev dependencies before copying to runtime stage
17
17
+
RUN npm prune --omit=dev
18
18
+
17
19
# ── Runtime stage ─────────────────────────────────────────────────────────────
18
20
FROM node:22-slim
19
21
20
20
-
RUN apt-get update && apt-get install -y --no-install-recommends \
21
21
-
python3 make g++ \
22
22
-
# Optional: Chromium for quote-tweet screenshot fallbacks
23
23
-
# chromium \
24
24
-
&& rm -rf /var/lib/apt/lists/*
25
25
-
26
22
WORKDIR /app
27
23
28
28
-
# Copy package files and install production deps only (rebuilds native modules)
29
29
-
COPY package*.json ./
30
30
-
RUN npm ci --omit=dev
31
31
-
32
32
-
# Copy built output from builder
33
24
COPY --from=builder /app/dist ./dist
34
34
-
35
35
-
# Persist config and SQLite database across restarts
36
36
-
VOLUME ["/app/data", "/app/config.json"]
25
25
+
COPY --from=builder /app/node_modules ./node_modules
26
26
+
COPY --from=builder /app/package.json ./package.json
37
27
28
28
+
# PORT is injected by Coolify — default to 3000 as fallback
38
29
ENV NODE_ENV=production \
39
30
PORT=3000 \
40
31
HOST=0.0.0.0
41
32
42
33
EXPOSE 3000
43
43
-
44
44
-
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
45
45
-
CMD node -e "require('http').get('http://localhost:' + (process.env.PORT||3000) + '/api/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"
46
34
47
35
CMD ["node", "dist/index.js"]