Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Release 3.7.0" #347

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions .devcontainer/Dockerfile

This file was deleted.

56 changes: 0 additions & 56 deletions .devcontainer/devcontainer.json

This file was deleted.

25 changes: 0 additions & 25 deletions .devcontainer/docker-compose.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

20 changes: 2 additions & 18 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"root": true,
"extends": [
"next",
"next/core-web-vitals",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["unused-imports", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"extends": ["next", "next/core-web-vitals", "plugin:prettier/recommended"],
"rules": {
"linebreak-style": ["error", "unix"],
"quotes": [
Expand Down Expand Up @@ -36,14 +28,6 @@
"react/style-prop-object": "warn",
"@next/next/no-img-element": "off",
"jsx-a11y/alt-text": "off",
"react/display-name": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
],
"@typescript-eslint/ban-ts-comment": "off"
"react/display-name": "off"
}
}
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/diced/zipline/discussions/new?category=ideas&title=Your%20breif%20description%20here&labels=feature
about: Ask for a new feature
- name: Zipline Discord
url: https://discord.gg/EAhCRfGxCF
about: Ask for help with anything related to Zipline!
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/milestone.yml

This file was deleted.

1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

598 changes: 288 additions & 310 deletions .yarn/releases/yarn-3.3.1.cjs → .yarn/releases/yarn-3.2.4.cjs

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.3.1.cjs
yarnPath: .yarn/releases/yarn-3.2.4.cjs
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Create an issue on GitHub, please include the following (if one of them is not a

## Feature requests

Create an discussion on GitHub, please include the following:
Create an issue on GitHub, please include the following:

- Breif explanation of the feature in the title (very breif please)
- How it would work (detailed, but optional)
Expand Down
96 changes: 43 additions & 53 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,75 +1,65 @@
# Use the Prisma binaries image as the first stage
FROM ghcr.io/diced/prisma-binaries:4.10.x as prisma
FROM ghcr.io/diced/prisma-binaries:4.7.x as prisma

# Use Alpine Linux as the second stage
FROM node:18-alpine3.16 as base
FROM node:alpine3.16 AS deps
RUN mkdir -p /prisma-engines
WORKDIR /build

# Set the working directory
WORKDIR /zipline

# Copy the necessary files from the project
COPY prisma ./prisma
COPY src ./src
COPY next.config.js ./next.config.js
COPY tsup.config.ts ./tsup.config.ts
COPY tsconfig.json ./tsconfig.json
COPY mimes.json ./mimes.json
COPY public ./public
COPY .yarn .yarn
COPY package.json yarn.lock .yarnrc.yml ./

FROM base as builder
RUN yarn install --immutable

COPY .yarn ./.yarn
COPY package*.json ./
COPY yarn*.lock ./
COPY .yarnrc.yml ./
FROM node:alpine3.16 AS builder
WORKDIR /build

# Copy the prisma binaries from prisma stage
COPY --from=prisma /prisma-engines /prisma-engines
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
PRISMA_MIGRATION_ENGINE_BINARY=/prisma-engines/migration-engine \
PRISMA_INTROSPECTION_ENGINE_BINARY=/prisma-engines/introspection-engine \
PRISMA_FMT_BINARY=/prisma-engines/prisma-fmt \
PRISMA_CLI_QUERY_ENGINE_TYPE=binary \
PRISMA_CLIENT_ENGINE_TYPE=binary \
ZIPLINE_DOCKER_BUILD=true \
NEXT_TELEMETRY_DISABLED=1
PRISMA_CLIENT_ENGINE_TYPE=binary

# Install production dependencies then temporarily save
RUN yarn workspaces focus --production --all
RUN cp -RL node_modules /tmp/node_modules
RUN apk add --no-cache openssl openssl-dev

# Install the dependencies
RUN yarn install --immutable
COPY --from=deps /build/node_modules ./node_modules
COPY src ./src
COPY prisma ./prisma
COPY .yarn .yarn
COPY package.json yarn.lock .yarnrc.yml esbuild.config.js next.config.js next-env.d.ts zip-env.d.ts tsconfig.json mimes.json ./

ENV ZIPLINE_DOCKER_BUILD 1
ENV NEXT_TELEMETRY_DISABLED 1

# Run the build
RUN yarn build

# Use Alpine Linux as the final image
FROM base
# Install the necessary packages
RUN apk add --no-cache perl procps tini
FROM node:alpine3.16 AS runner
WORKDIR /zipline

COPY --from=builder /prisma-engines /prisma-engines
COPY --from=prisma /prisma-engines /prisma-engines
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
PRISMA_MIGRATION_ENGINE_BINARY=/prisma-engines/migration-engine \
PRISMA_INTROSPECTION_ENGINE_BINARY=/prisma-engines/introspection-engine \
PRISMA_FMT_BINARY=/prisma-engines/prisma-fmt \
PRISMA_CLI_QUERY_ENGINE_TYPE=binary \
PRISMA_CLIENT_ENGINE_TYPE=binary \
NEXT_TELEMETRY_DISABLED=1

# Copy only the necessary files from the previous stage
COPY --from=builder /zipline/dist ./dist
COPY --from=builder /zipline/.next ./.next
COPY --from=builder /zipline/package.json ./package.json

COPY --from=builder /zipline/node_modules ./node_modules
COPY --from=builder /zipline/node_modules/.prisma/client ./node_modules/.prisma/client
COPY --from=builder /zipline/node_modules/@prisma/client ./node_modules/@prisma/client

# Copy Startup Script
COPY docker-entrypoint.sh /zipline
# Make Startup Script Executable
RUN chmod a+x /zipline/docker-entrypoint.sh
# Set the entrypoint to the startup script
ENTRYPOINT ["tini", "--", "/zipline/docker-entrypoint.sh"]
PRISMA_CLIENT_ENGINE_TYPE=binary

RUN apk add --no-cache openssl openssl-dev
RUN apk add --no-cache perl procps

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

COPY --from=builder /build/.next ./.next
COPY --from=builder /build/node_modules ./node_modules

COPY --from=builder /build/next.config.js ./next.config.js
COPY --from=builder /build/esbuild.config.js ./esbuild.config.js
COPY --from=builder /build/src ./src
COPY --from=builder /build/dist ./dist
COPY --from=builder /build/prisma ./prisma
COPY --from=builder /build/tsconfig.json ./tsconfig.json
COPY --from=builder /build/package.json ./package.json
COPY --from=builder /build/mimes.json ./mimes.json

CMD ["node", "--enable-source-maps", "dist/server"]
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A ShareX/file upload server that is easy to use, packed with features, and with
- Password Protected Uploads
- URL shortening
- Text uploading
- URL Formats (uuid, dates, random alphanumeric, original name, zws, gfycat -> [animals](https://assets.gfycat.com/animals) [adjectives](https://assets.gfycat.com/adjectives))
- URL Formats (uuid, dates, random alphanumeric, original name, zws)
- Discord embeds (OG metadata)
- Gallery viewer, and multiple file format support
- Code highlighting
Expand All @@ -35,16 +35,7 @@ A ShareX/file upload server that is easy to use, packed with features, and with
- User invites
- File Chunking (for large files)
- File deletion once it reaches a certain amount of views
- Easy setup instructions on [docs](https://zipl.vercel.app/) (One command install `docker compose up -d`)

<details>
<summary>View upstream documentation</summary>

The website below provides documentation for more up-to-date features with the upstream branch. The normal documentation is for the latest release and is not updated unless a new release is made.

[https://trunk.zipline.diced.tech/](https://trunk.zipline.diced.tech/)

</details>
- Easy setup instructions on [docs](https://zipl.vercel.app/) (One command install `docker-compose up -d`)

<details>
<summary><h2>Screenshots (click)</h2></summary>
Expand All @@ -60,13 +51,13 @@ The website below provides documentation for more up-to-date features with the u

## Install & run with Docker

This section requires [Docker](https://docs.docker.com/get-docker/) and [docker compose](https://docs.docker.com/compose/install/).
This section requires [Docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/).

```shell
git clone https://github.com/diced/zipline
cd zipline

docker compose up -d
docker-compose up -d
```

### After installing
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: '3'
services:
postgres:
image: postgres:15
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
Expand All @@ -20,6 +21,7 @@ services:
dockerfile: Dockerfile
ports:
- '3000:3000'
restart: unless-stopped
env_file:
- .env.local
volumes:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'
services:
postgres:
image: postgres:15
restart: unless-stopped
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
Expand All @@ -19,7 +19,7 @@ services:
image: ghcr.io/diced/zipline
ports:
- '3000:3000'
restart: unless-stopped
restart: always
environment:
- CORE_RETURN_HTTPS=false
- CORE_SECRET=changethis
Expand Down
5 changes: 0 additions & 5 deletions docker-entrypoint.sh

This file was deleted.