mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-06 18:03:48 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e77f856515 | ||
|
|
0de92864eb | ||
|
|
8ecec5c1bf | ||
|
|
78cf0139b8 | ||
|
|
591c76c15a | ||
|
|
2a3d1d4105 | ||
|
|
5bff933b6e | ||
|
|
0ba1bd7113 | ||
|
|
0eb13d9d1b | ||
|
|
ad109d1724 | ||
|
|
f9e214a1e5 | ||
|
|
0d8db3e309 | ||
|
|
c7647daff7 |
51
.github/workflows/github-image.yml
vendored
Normal file
51
.github/workflows/github-image.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# GitHub recommends pinning actions to a commit SHA.
|
||||
# To get a newer version, you will need to update the SHA.
|
||||
# You can also reference a tag or branch, but the action may change without warning.
|
||||
|
||||
name: GHCR Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push-image:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -1,14 +1,22 @@
|
||||
# Deployment Notes
|
||||
The easiest way to get PairDrop up and running is by using Docker.
|
||||
|
||||
## Deployment with Docker from Docker Hub
|
||||
## Deployment with Docker
|
||||
> You must use a server proxy to set the X-Forwarded-For to prevent all clients from discovering each other (See [#HTTP-Server](#http-server)).
|
||||
>
|
||||
> To prevent bypassing the proxy and reach the docker container directly, `127.0.0.1` is specified in the run command.
|
||||
|
||||
### Image from Docker Hub
|
||||
|
||||
```bash
|
||||
docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 lscr.io/linuxserver/pairdrop
|
||||
```
|
||||
> You must use a server proxy to set the X-Forwarded-For to prevent all clients from discovering each other (See [#HTTP-Server](#http-server)).
|
||||
>
|
||||
> To prevent bypassing the proxy and reach the docker container directly, `127.0.0.1` is specified in the run command.
|
||||
|
||||
### Image from GHCR
|
||||
|
||||
```bash
|
||||
docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 ghcr.io/schlagmichdoch/pairdrop
|
||||
```
|
||||
|
||||
### Options / Flags
|
||||
Set options by using the following flags in the `docker run` command:
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "pairdrop",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pairdrop",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.3",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pairdrop",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -839,8 +839,8 @@ class PairDeviceDialog extends Dialog {
|
||||
// Display the QR code for the url
|
||||
const qr = new QRCode({
|
||||
content: this._getShareRoomURL(),
|
||||
width: 80,
|
||||
height: 80,
|
||||
width: 150,
|
||||
height: 150,
|
||||
padding: 0,
|
||||
background: "transparent",
|
||||
color: getComputedStyle(document.body).getPropertyValue('--text-color'),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const cacheVersion = 'v1.1.0';
|
||||
const cacheVersion = 'v1.1.3';
|
||||
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
|
||||
const urlsToCache = [
|
||||
'index.html',
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
/* Layout */
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
height: -webkit-fill-available;
|
||||
}
|
||||
|
||||
html,
|
||||
@@ -25,6 +26,8 @@ body {
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100%;
|
||||
min-height: -webkit-fill-available;
|
||||
flex-grow: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -407,6 +410,7 @@ x-dialog x-background {
|
||||
transition: opacity 300ms;
|
||||
will-change: opacity;
|
||||
padding: 35px;
|
||||
overflow: overlay;
|
||||
}
|
||||
|
||||
x-dialog x-paper {
|
||||
@@ -421,6 +425,13 @@ x-dialog x-paper {
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
#pairDeviceDialog x-paper {
|
||||
position: absolute;
|
||||
top: max(50%, 350px);
|
||||
height: 650px;
|
||||
margin-top: -325px;
|
||||
}
|
||||
|
||||
x-dialog:not([show]) {
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -491,8 +502,8 @@ x-dialog .font-subheading {
|
||||
#roomKeyQrCode {
|
||||
padding: inherit;
|
||||
margin: auto;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
#pairDeviceDialog hr {
|
||||
@@ -619,6 +630,7 @@ x-dialog .row-reverse {
|
||||
#base64PasteDialog button[close] {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#base64PasteDialog button[close]:before {
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -931,7 +943,7 @@ screen and (min-width: 1100px) {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
x-instructions:before {
|
||||
x-instructions:not([drop-peer]):not([drop-bg]):before {
|
||||
content: attr(mobile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -840,8 +840,8 @@ class PairDeviceDialog extends Dialog {
|
||||
// Display the QR code for the url
|
||||
const qr = new QRCode({
|
||||
content: this._getShareRoomURL(),
|
||||
width: 80,
|
||||
height: 80,
|
||||
width: 150,
|
||||
height: 150,
|
||||
padding: 0,
|
||||
background: "transparent",
|
||||
color: getComputedStyle(document.body).getPropertyValue('--text-color'),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const cacheVersion = 'v1.1.0';
|
||||
const cacheVersion = 'v1.1.3';
|
||||
const cacheTitle = `pairdrop-included-ws-fallback-cache-${cacheVersion}`;
|
||||
const urlsToCache = [
|
||||
'index.html',
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
/* Layout */
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
height: -webkit-fill-available;
|
||||
}
|
||||
|
||||
html,
|
||||
@@ -26,6 +27,8 @@ body {
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100%;
|
||||
min-height: -webkit-fill-available;
|
||||
flex-grow: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -416,6 +419,7 @@ x-dialog x-background {
|
||||
transition: opacity 300ms;
|
||||
will-change: opacity;
|
||||
padding: 35px;
|
||||
overflow: overlay;
|
||||
}
|
||||
|
||||
x-dialog x-paper {
|
||||
@@ -430,6 +434,13 @@ x-dialog x-paper {
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
#pairDeviceDialog x-paper {
|
||||
position: absolute;
|
||||
top: max(50%, 350px);
|
||||
height: 650px;
|
||||
margin-top: -325px;
|
||||
}
|
||||
|
||||
x-dialog:not([show]) {
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -500,8 +511,8 @@ x-dialog .font-subheading {
|
||||
#roomKeyQrCode {
|
||||
padding: inherit;
|
||||
margin: auto;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
#pairDeviceDialog hr {
|
||||
@@ -628,6 +639,7 @@ x-dialog .row-reverse {
|
||||
#base64PasteDialog button[close] {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#base64PasteDialog button[close]:before {
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -944,7 +956,7 @@ screen and (min-width: 1100px) {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
x-instructions:before {
|
||||
x-instructions:not([drop-peer]):not([drop-bg]):before {
|
||||
content: attr(mobile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user