Skip to content

Commit c7e9ba4

Browse files
committed
linux window issue fix
1 parent c127993 commit c7e9ba4

4 files changed

Lines changed: 136 additions & 5 deletions

File tree

.dockerignore

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.github
5+
6+
# Build artifacts
7+
target/
8+
src-tauri/target/
9+
node_modules/
10+
web-app/node_modules/
11+
web-app/dist/
12+
13+
# IDE
14+
.vscode/
15+
.idea/
16+
*.swp
17+
*.swo
18+
*~
19+
20+
# OS
21+
.DS_Store
22+
Thumbs.db
23+
24+
# Documentation (we'll copy selectively if needed)
25+
*.md
26+
!README.md
27+
28+
# CI/CD
29+
.github/
30+
31+
# Logs
32+
*.log
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
37+
# Environment
38+
.env
39+
.env.local
40+
.env.*.local
41+
42+
# Reference directories (not needed for build)
43+
src-tauri-reference/
44+
web-app-reference/
45+
46+
# Cache files
47+
.cache/
48+
*.tsbuildinfo
49+
50+
# Lock files (we use package-lock.json)
51+
yarn.lock
52+
pnpm-lock.yaml
53+

Dockerfile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Multi-stage Dockerfile for AltSendme Tauri Application
2+
# Stage 1: Builder - Build the Tauri application
3+
FROM rust:latest AS builder
4+
5+
# Install system dependencies required for Tauri Linux builds
6+
RUN apt-get update && apt-get install -y \
7+
libwebkit2gtk-4.1-dev \
8+
libappindicator3-dev \
9+
librsvg2-dev \
10+
patchelf \
11+
curl \
12+
wget \
13+
file \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Install Node.js 20 LTS
17+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
18+
apt-get install -y nodejs && \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
# Set working directory
22+
WORKDIR /app
23+
24+
# Copy package files for dependency caching
25+
COPY web-app/package*.json ./web-app/
26+
COPY src-tauri/package.json ./src-tauri/
27+
28+
# Install frontend dependencies
29+
RUN cd web-app && npm ci
30+
31+
# Copy the entire project
32+
COPY . .
33+
34+
# Build the frontend
35+
RUN cd web-app && npm run build
36+
37+
# Install Tauri CLI and build the application (creates bundles for installers)
38+
WORKDIR /app/src-tauri
39+
RUN cargo install tauri-cli --locked
40+
RUN cargo tauri build --bundles deb,appimage
41+
42+
# Stage 2: Runtime - Create a minimal runtime image
43+
FROM debian:bookworm-slim AS runtime
44+
45+
# Install runtime dependencies for running Tauri GUI apps
46+
RUN apt-get update && apt-get install -y \
47+
libwebkit2gtk-4.1-0 \
48+
libappindicator3-1 \
49+
librsvg2-2 \
50+
libgtk-3-0 \
51+
libayatana-appindicator3-1 \
52+
ca-certificates \
53+
&& rm -rf /var/lib/apt/lists/*
54+
55+
# Create a non-root user for security
56+
RUN useradd -m -u 1000 appuser
57+
58+
# Set working directory
59+
WORKDIR /app
60+
61+
# Copy the built application from builder stage
62+
COPY --from=builder /app/src-tauri/target/release/alt-sendme /app/alt-sendme
63+
# Note: bundle directory is only created by `cargo tauri build`, not `cargo build`
64+
# For runtime image, we only need the binary
65+
66+
# Change ownership to non-root user
67+
RUN chown -R appuser:appuser /app
68+
69+
# Switch to non-root user
70+
USER appuser
71+
72+
# Set environment variables
73+
ENV DISPLAY=:0
74+
ENV RUST_LOG=info
75+
76+
# The application binary
77+
CMD ["/app/alt-sendme"]
78+

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ The easiest way to get started is by downloading one of the following versions f
3030
</tr>
3131
<tr>
3232
<td><b>Windows</b></td>
33-
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.3/AltSendme_0.1.3_x64-setup_windows.exe'>AltSendme.exe</a></td>
33+
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.4/AltSendme_0.1.4_x64-setup_windows.exe'>AltSendme.exe</a></td>
3434
</tr>
3535
<tr>
3636
<td><b>macOS*</b></td>
37-
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.3/AltSendme_0.1.3_aarch64_darwin.dmg'>AltSendme.dmg</a></td>
37+
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.4/AltSendme_0.1.4_aarch64_darwin.dmg'>AltSendme.dmg</a></td>
3838
</tr>
3939
<tr>
4040
<td><b>Linux (deb)</b></td>
41-
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.3/AltSendme_0.1.3_amd64_linux.deb'>AltSendme.deb</a></td>
41+
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.4/AltSendme_0.1.4_amd64_linux.deb'>AltSendme.deb</a></td>
4242
</tr>
4343
<tr>
4444
<td><b>Linux (AppImage)</b></td>
45-
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.3/AltSendme_0.1.3_amd64_linux.AppImage'>AltSendme.AppImage</a></td>
45+
<td><a href='https://github.com/tonyantony300/alt-sendme/releases/download/v0.1.4/AltSendme_0.1.4_amd64_linux.AppImage'>AltSendme.AppImage</a></td>
4646
</tr>
4747
</table>
4848

web-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "AltSendme",
33
"private": true,
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

0 commit comments

Comments
 (0)