-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (38 loc) · 866 Bytes
/
Dockerfile
File metadata and controls
51 lines (38 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM node:18-alpine
WORKDIR /app
# Install dependencies for native modules and tools
RUN apk add --no-cache \
python3 \
make \
g++ \
bash \
jq \
curl
# Copy package files
COPY package*.json ./
# Install main dependencies
RUN npm ci --only=production=false
# Copy main source
COPY tinyclaw.sh ./tinyclaw.sh
COPY src/ ./src/
COPY lib/ ./lib/
COPY scripts/ ./scripts/
# Build TypeScript
RUN npm run build
# Copy TinyOffice
COPY tinyoffice/ ./tinyoffice/
WORKDIR /app/tinyoffice
COPY tinyoffice/package*.json ./
RUN npm install
# Go back to app root
WORKDIR /app
# Create data directory
RUN mkdir -p /.tinyclaw
# Set environment
ENV NODE_ENV=production
# Expose ports for TinyOffice
EXPOSE 3000 3777
# Make startup script executable
RUN chmod +x ./scripts/railway-start.sh
# Run the startup script
CMD ["./scripts/railway-start.sh"]