mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 06:30:53 +03:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71a925a674 | ||
|
|
64d9cd694d | ||
|
|
94b78b425f | ||
|
|
42e94139a2 | ||
|
|
6bd6280fb5 | ||
|
|
1f2c524b40 | ||
|
|
854810c242 | ||
|
|
45024d3dc6 | ||
|
|
0806b8fd9d | ||
|
|
2dbc740998 | ||
|
|
5b9c8301c7 | ||
|
|
42506dda9d | ||
|
|
8e868a642c |
@@ -1,4 +1,4 @@
|
|||||||
image: "node:12-slim"
|
image: "node:15-slim"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
@@ -17,6 +17,7 @@ before_script:
|
|||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends
|
- apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends
|
||||||
|
|
||||||
|
# Build Send, run npm tests
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
@@ -24,48 +25,81 @@ test:
|
|||||||
- npm run lint
|
- npm run lint
|
||||||
- npm test
|
- npm test
|
||||||
|
|
||||||
# Release Docker image artifact for easy testing
|
# Build Docker image, export Docker image artifact
|
||||||
artifact-docker:
|
artifact-docker:
|
||||||
stage: artifact
|
stage: artifact
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
|
needs: []
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
variables:
|
||||||
|
IMG_FILE: "send:git-$CI_COMMIT_SHORT_SHA.tar"
|
||||||
|
IMG_NAME: "send:git-$CI_COMMIT_SHORT_SHA"
|
||||||
|
before_script: []
|
||||||
|
script:
|
||||||
|
- docker build -t $IMG_NAME .
|
||||||
|
- docker image save -o $IMG_FILE $IMG_NAME
|
||||||
|
artifacts:
|
||||||
|
name: artifact-docker
|
||||||
|
paths:
|
||||||
|
- $IMG_FILE
|
||||||
|
expire_in: 1 week
|
||||||
|
|
||||||
|
# Release public Docker image for the master branch
|
||||||
|
release-docker-master:
|
||||||
|
stage: release
|
||||||
|
image: docker:latest
|
||||||
|
dependencies:
|
||||||
|
- artifact-docker
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
variables:
|
||||||
|
IMG_IMPORT_FILE: "send:git-$CI_COMMIT_SHORT_SHA.tar"
|
||||||
|
IMG_IMPORT_NAME: "send:git-$CI_COMMIT_SHORT_SHA"
|
||||||
|
IMG_NAME: "registry.gitlab.com/timvisee/send:master-$CI_COMMIT_SHORT_SHA"
|
||||||
before_script: []
|
before_script: []
|
||||||
script:
|
script:
|
||||||
- export IMG_NAME=registry.gitlab.com/timvisee/send:master-$CI_COMMIT_SHA
|
|
||||||
|
|
||||||
# Login in to registry
|
# Login in to registry
|
||||||
- 'docker login registry.gitlab.com -u $DOCKER_USER -p $DOCKER_PASS'
|
- 'docker login registry.gitlab.com -u $DOCKER_USER -p $DOCKER_PASS'
|
||||||
|
|
||||||
# Build and push image, report image name
|
# Load existing, retag for new image images
|
||||||
- docker build -t $IMG_NAME .
|
- docker image load -i $IMG_IMPORT_FILE
|
||||||
- docker push $IMG_NAME
|
- docker tag $IMG_IMPORT_NAME $IMG_NAME
|
||||||
- 'echo Docker image artifact published, available as:'
|
|
||||||
- 'echo " docker pull $IMG_NAME"'
|
|
||||||
|
|
||||||
# Release public Docker image
|
# Publish tagged image
|
||||||
|
- docker push $IMG_NAME
|
||||||
|
|
||||||
|
- 'echo "Docker image artifact published, available as:" && echo " docker pull $IMG_NAME"'
|
||||||
|
|
||||||
|
# Release public Docker image for a version tag
|
||||||
release-docker:
|
release-docker:
|
||||||
stage: release
|
stage: release
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
|
dependencies:
|
||||||
|
- artifact-docker
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
only:
|
only:
|
||||||
- /^v(\d+\.)*\d+$/
|
- /^v(\d+\.)*\d+$/
|
||||||
|
variables:
|
||||||
|
IMG_IMPORT_FILE: "send:git-$CI_COMMIT_SHORT_SHA.tar"
|
||||||
|
IMG_IMPORT_NAME: "send:git-$CI_COMMIT_SHORT_SHA"
|
||||||
|
IMG_NAME: "registry.gitlab.com/timvisee/send:$CI_COMMIT_REF_NAME"
|
||||||
|
IMG_NAME_LATEST: "registry.gitlab.com/timvisee/send:latest"
|
||||||
before_script: []
|
before_script: []
|
||||||
script:
|
script:
|
||||||
- export IMG_NAME=registry.gitlab.com/timvisee/send:$CI_COMMIT_REF_NAME
|
|
||||||
- export IMG_NAME_LATEST=registry.gitlab.com/timvisee/send:latest
|
|
||||||
|
|
||||||
# Login in to registry
|
# Login in to registry
|
||||||
- 'docker login registry.gitlab.com -u $DOCKER_USER -p $DOCKER_PASS'
|
- 'docker login registry.gitlab.com -u $DOCKER_USER -p $DOCKER_PASS'
|
||||||
|
|
||||||
# Build and push image, report image name
|
# Load existing, retag for new image images
|
||||||
- docker build -t $IMG_NAME .
|
- docker image load -i $IMG_IMPORT_FILE
|
||||||
- docker tag $IMG_NAME $IMG_NAME_LATEST
|
- docker tag $IMG_IMPORT_NAME $IMG_NAME
|
||||||
|
- docker tag $IMG_IMPORT_NAME $IMG_NAME_LATEST
|
||||||
|
|
||||||
|
# Publish tagged image
|
||||||
- docker push $IMG_NAME
|
- docker push $IMG_NAME
|
||||||
- docker push $IMG_NAME_LATEST
|
- docker push $IMG_NAME_LATEST
|
||||||
- 'echo Docker image artifact published, available as:'
|
|
||||||
- 'echo " docker pull $IMG_NAME_LATEST"'
|
- 'echo "Docker image artifact published, available as:" && echo " docker pull $IMG_NAME_LATEST" && echo " docker pull $IMG_NAME"'
|
||||||
- 'echo " docker pull $IMG_NAME"'
|
|
||||||
|
|||||||
12
Dockerfile
12
Dockerfile
@@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
|
|
||||||
# Build project
|
# Build project
|
||||||
FROM node:12 AS builder
|
FROM node:15.5.1-alpine AS builder
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Add user
|
# Add user
|
||||||
&& addgroup --gid 10001 app \
|
&& addgroup --gid 10001 app \
|
||||||
&& adduser --disabled-password \
|
&& adduser --disabled-password \
|
||||||
--gecos '' \
|
--gecos '' \
|
||||||
--gid 10001 \
|
--ingroup app \
|
||||||
--home /app \
|
--home /app \
|
||||||
--uid 10001 \
|
--uid 10001 \
|
||||||
app
|
app
|
||||||
@@ -26,19 +26,17 @@ RUN set -x \
|
|||||||
|
|
||||||
|
|
||||||
# Main image
|
# Main image
|
||||||
FROM node:12-slim
|
FROM node:15.5.1-alpine
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Add user
|
# Add user
|
||||||
&& addgroup --gid 10001 app \
|
&& addgroup --gid 10001 app \
|
||||||
&& adduser --disabled-password \
|
&& adduser --disabled-password \
|
||||||
--gecos '' \
|
--gecos '' \
|
||||||
--gid 10001 \
|
--ingroup app \
|
||||||
--home /app \
|
--home /app \
|
||||||
--uid 10001 \
|
--uid 10001 \
|
||||||
app
|
app
|
||||||
RUN apt-get update && apt-get -y install \
|
|
||||||
git-core \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --chown=app:app package*.json ./
|
COPY --chown=app:app package*.json ./
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ details[open] > summary > svg {
|
|||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
footer li:hover {
|
footer li a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,11 @@ class Footer extends Component {
|
|||||||
<footer
|
<footer
|
||||||
class="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-60 dark:text-grey-40 md:items-center justify-between"
|
class="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-60 dark:text-grey-40 md:items-center justify-between"
|
||||||
>
|
>
|
||||||
<div>${translate('footerText')}</div>
|
<ul
|
||||||
|
class="flex flex-col md:flex-row items-start md:items-center md:justify-start"
|
||||||
|
>
|
||||||
|
<li class="m-2">${translate('footerText')}</li>
|
||||||
|
</ul>
|
||||||
<ul
|
<ul
|
||||||
class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
|
class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
|
||||||
>
|
>
|
||||||
|
|||||||
2116
package-lock.json
generated
2116
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "send",
|
"name": "send",
|
||||||
"description": "File Sharing Experiment",
|
"description": "File Sharing Experiment",
|
||||||
"version": "3.4.1",
|
"version": "3.4.4",
|
||||||
"author": "Mozilla (https://mozilla.org)",
|
"author": "Mozilla (https://mozilla.org)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
|
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
|
||||||
@@ -61,13 +61,13 @@
|
|||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.16.3"
|
"node": "^15.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.12.10",
|
"@babel/core": "^7.12.16",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
"@babel/plugin-proposal-class-properties": "^7.12.13",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/preset-env": "^7.12.11",
|
"@babel/preset-env": "^7.12.16",
|
||||||
"@dannycoates/webcrypto-liner": "^0.1.37",
|
"@dannycoates/webcrypto-liner": "^0.1.37",
|
||||||
"@fullhuman/postcss-purgecss": "^1.3.0",
|
"@fullhuman/postcss-purgecss": "^1.3.0",
|
||||||
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
|
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
|
||||||
@@ -113,12 +113,11 @@
|
|||||||
"proxyquire": "^2.1.3",
|
"proxyquire": "^2.1.3",
|
||||||
"puppeteer": "^2.0.0",
|
"puppeteer": "^2.0.0",
|
||||||
"raw-loader": "^3.1.0",
|
"raw-loader": "^3.1.0",
|
||||||
"redis-mock": "^0.47.0",
|
|
||||||
"rimraf": "^3.0.0",
|
"rimraf": "^3.0.0",
|
||||||
"script-loader": "^0.7.2",
|
"script-loader": "^0.7.2",
|
||||||
"sinon": "^7.5.0",
|
"sinon": "^7.5.0",
|
||||||
"string-hash": "^1.1.3",
|
"string-hash": "^1.1.3",
|
||||||
"stylelint": "^13.9.0",
|
"stylelint": "^13.10.0",
|
||||||
"stylelint-config-standard": "^19.0.0",
|
"stylelint-config-standard": "^19.0.0",
|
||||||
"stylelint-no-unsupported-browser-features": "^4.1.4",
|
"stylelint-no-unsupported-browser-features": "^4.1.4",
|
||||||
"svgo": "^1.3.2",
|
"svgo": "^1.3.2",
|
||||||
@@ -136,9 +135,9 @@
|
|||||||
"@dannycoates/express-ws": "^5.0.3",
|
"@dannycoates/express-ws": "^5.0.3",
|
||||||
"@fluent/bundle": "^0.13.0",
|
"@fluent/bundle": "^0.13.0",
|
||||||
"@fluent/langneg": "^0.3.0",
|
"@fluent/langneg": "^0.3.0",
|
||||||
"@google-cloud/storage": "^5.7.3",
|
"@google-cloud/storage": "^5.7.4",
|
||||||
"@sentry/node": "^5.30.0",
|
"@sentry/node": "^5.30.0",
|
||||||
"aws-sdk": "^2.831.0",
|
"aws-sdk": "^2.844.0",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"choo": "^7.0.0",
|
"choo": "^7.0.0",
|
||||||
"cldr-core": "^35.1.0",
|
"cldr-core": "^35.1.0",
|
||||||
@@ -150,8 +149,9 @@
|
|||||||
"mozlog": "^2.2.0",
|
"mozlog": "^2.2.0",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"redis": "^2.8.0",
|
"redis": "^2.8.0",
|
||||||
|
"redis-mock": "^0.47.0",
|
||||||
"selenium-standalone": "^6.23.0",
|
"selenium-standalone": "^6.23.0",
|
||||||
"ua-parser-js": "^0.7.23"
|
"ua-parser-js": "^0.7.24"
|
||||||
},
|
},
|
||||||
"availableLanguages": [
|
"availableLanguages": [
|
||||||
"en-US",
|
"en-US",
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ const conf = convict({
|
|||||||
footer_source_url: {
|
footer_source_url: {
|
||||||
format: String,
|
format: String,
|
||||||
default: 'https://github.com/timvisee/send',
|
default: 'https://github.com/timvisee/send',
|
||||||
env: 'SEND_FOOTER_CLI_URL'
|
env: 'SEND_FOOTER_SOURCE_URL'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user