Skip to content

Commit

Permalink
Merge pull request #176 from Dushyantbha012/main
Browse files Browse the repository at this point in the history
Updated docker file to support Windows build
  • Loading branch information
Pranav0-0Aggarwal authored Dec 30, 2024
2 parents ce1b5b7 + 9b316a9 commit a5f2e9c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
projectPath: frontend
env:
# Use secrets for signing the Tauri app
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5NlF2SjE3cWNXOVlQQ0JBTlNITEpOUVoyQ3ZuNTdOSkwyNE1NN2RmVWQ1a0FBQkFBQUFBQUFBQUFBQUlBQUFBQU9XOGpTSFNRd0Q4SjNSbm5Oc1E0OThIUGx6SS9lWXI3ZjJxN3BESEh1QTRiQXlkR2E5aG1oK1g0Tk5kcmFzc0IvZFZScEpubnptRkxlbDlUR2R1d1Y5OGRSYUVmUGoxNTFBcHpQZ1dSS2lHWklZVHNkV1Byd1VQSnZCdTZFWlVGOUFNVENBRlgweUU9Cg==
TAURI_SIGNING_PRIVATE_KEY_PASSWORD : pass
13 changes: 12 additions & 1 deletion docs/frontend/docker-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ Replace `<HOST_IP>` with your actual IP address.
npm run tauri dev
```

## Building the Tauri App

### Linux
```bash
npm run tauri build
```
### Windows
```bash
npm run tauri build -- --runner cargo-xwin --target x86_64-pc-windows-msvc
```

## Accessing the GUI App

If everything is configured correctly, the Tauri GUI app should display on your screen after running the container.
Expand All @@ -112,4 +123,4 @@ If the container can't connect to the X server:
1. Check your firewall settings and ensure it's not blocking the connection.
2. On Windows, try using the host's IP address instead of localhost.

By following this guide and keeping these notes in mind, you should be able to successfully set up and run the PictoPy frontend using Docker across different platforms. If you encounter any persistent issues, please refer to the project's issue tracker or seek assistance from the development team.
By following this guide and keeping these notes in mind, you should be able to successfully set up and run the PictoPy frontend using Docker across different platforms. If you encounter any persistent issues, please refer to the project's issue tracker or seek assistance from the development team.
17 changes: 14 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ RUN apt-get update && \
libwebkit2gtk-4.1-dev \
librsvg2-dev \
file \
dbus-x11 \
dconf-cli \
nsis \
lld \
llvm \
clang \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Node.js (Node.js 16 is compatible with Tauri)
Expand All @@ -41,17 +43,26 @@ RUN npm install -g @tauri-apps/cli
ARG TAURI_SIGNING_PRIVATE_KEY
ARG TAURI_SIGNING_PRIVATE_KEY_PASSWORD

#Setting up Windows Rust target
RUN rustup target add x86_64-pc-windows-msvc
RUN cargo install --locked cargo-xwin

# Copy the application source code to the container
WORKDIR /app

# Copy the package.json file
COPY package.json .

# Install dependencies
RUN npm install

# Copy the rest of the code
COPY . .

# Set environment variables using build arguments
ENV TAURI_SIGNING_PRIVATE_KEY=$TAURI_SIGNING_PRIVATE_KEY
ENV TAURI_SIGNING_PRIVATE_KEY_PASSWORD=$TAURI_SIGNING_PRIVATE_KEY_PASSWORD

# Set the container's entrypoint to access the bundled files
EXPOSE 1420
CMD ["npm","run","tauri","dev"]
CMD ["tail", "-f" ,"/dev/null"]

0 comments on commit a5f2e9c

Please sign in to comment.