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: Docker
Index
2 weeks ago
ec2bbfb2
26c9ab73
+69
2 changed files
expand all
collapse all
unified
split
Dockerfile
docker-compose.yml
+48
Dockerfile
···
1
1
+
# Use Node 22 as required by the project
2
2
+
FROM node:22-slim AS builder
3
3
+
4
4
+
# Install build essentials for native modules (better-sqlite3)
5
5
+
RUN apt-get update && apt-get install -y \
6
6
+
python3 \
7
7
+
make \
8
8
+
g++ \
9
9
+
git \
10
10
+
&& rm -rf /var/lib/apt/lists/*
11
11
+
12
12
+
WORKDIR /app
13
13
+
14
14
+
# Install dependencies
15
15
+
COPY package*.json ./
16
16
+
RUN npm install
17
17
+
18
18
+
# Copy source and build both server and web dashboard
19
19
+
COPY . .
20
20
+
RUN npm run build
21
21
+
22
22
+
# --- Production Image ---
23
23
+
FROM node:22-slim
24
24
+
25
25
+
# Install runtime dependencies (Puppeteer/Chromium dependencies if needed)
26
26
+
RUN apt-get update && apt-get install -y \
27
27
+
chromium \
28
28
+
&& rm -rf /var/lib/apt/lists/*
29
29
+
30
30
+
WORKDIR /app
31
31
+
32
32
+
# Copy built files and production node_modules
33
33
+
COPY --from=builder /app/dist ./dist
34
34
+
COPY --from=builder /app/node_modules ./node_modules
35
35
+
COPY --from=builder /app/package.json ./package.json
36
36
+
COPY --from=builder /app/public ./public
37
37
+
38
38
+
# Create data directory for SQLite and Config
39
39
+
RUN mkdir -p /app/data
40
40
+
41
41
+
# Environment defaults
42
42
+
ENV NODE_ENV=production
43
43
+
ENV PORT=3000
44
44
+
45
45
+
EXPOSE 3000
46
46
+
47
47
+
# Start the application
48
48
+
CMD ["npm", "start"]
+21
docker-compose.yml
···
1
1
+
services:
2
2
+
tweets-2-bsky:
3
3
+
build: .
4
4
+
container_name: tweets-2-bsky
5
5
+
restart: unless-stopped
6
6
+
ports:
7
7
+
- "3000:3000"
8
8
+
volumes:
9
9
+
- ./data:/app/data
10
10
+
- ./config.json:/app/config.json
11
11
+
environment:
12
12
+
- TWITTER_AUTH_TOKEN=${TWITTER_AUTH_TOKEN:?}
13
13
+
- TWITTER_CT0=${TWITTER_CT0:?}
14
14
+
- TWITTER_TARGET_USERNAME=${TWITTER_TARGET_USERNAME:?}
15
15
+
- BLUESKY_IDENTIFIER=${BLUESKY_IDENTIFIER:? }
16
16
+
- BLUESKY_PASSWORD=${BLUESKY_PASSWORD:?}
17
17
+
- CHECK_INTERVAL_MINUTES=5
18
18
+
- PORT=3000
19
19
+
- JWT_SECRET=${JWT_SECRET:?}
20
20
+
- NODE_ENV=production
21
21
+
- GEMINI_API_KEY=${GEMINI_API_KEY}