diced / zipline

A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
https://zipline.diced.sh/
MIT License
1.19k stars 124 forks source link

[BUG] docker-compose failed #72

Closed changchichung closed 3 years ago

changchichung commented 3 years ago

Describe the bug docker-compose won't start

  1. copy docker-compose template
    cp docker-compose.template.yml docker-compose.yml
  2. update expose ports
    version: "3"
    services:
    zipline:
    ports:
      - "87:8000"
    volumes:
      - "./uploads:/opt/zipline/uploads"
    build: .
    tty: true
  3. docker-compose up -d
    
    chchang@hqdc039:~/git/zipline$ docker-compose up -d
    Creating network "zipline_default" with the default driver
    Building zipline
    Step 1/8 : FROM node:14
    14: Pulling from library/node
    76b8ef87096f: Pull complete
    2e2bafe8a0f4: Pull complete
    b53ce1fd2746: Pull complete
    84a8c1bd5887: Pull complete
    7a803dc0b40f: Pull complete
    b800e94e7303: Pull complete
    8e9f42962912: Pull complete
    cc1c1f0d8c86: Pull complete
    a42c31ab44dd: Pull complete
    Digest: sha256:8eb45f4677c813ad08cef8522254640aa6a1800e75a9c213a0a651f6f3564189
    Status: Downloaded newer image for node:14
    ---> d6602e31594f
    Step 2/8 : WORKDIR /opt/zipline
    ---> Running in 8278610801e5
    Removing intermediate container 8278610801e5
    ---> 75e703a95bc3
    Step 3/8 : COPY . /opt/zipline
    ---> f479c232a4a0
    Step 4/8 : RUN npm i
    ---> Running in 08036a204853
    npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
    npm WARN deprecated mkdirp@0.5.3: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
    npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
    npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
    npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

bcrypt@5.0.1 install /opt/zipline/node_modules/bcrypt node-pre-gyp install --fallback-to-build

[bcrypt] Success: "/opt/zipline/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote

@ampproject/toolbox-optimizer@2.6.0 postinstall /opt/zipline/node_modules/@ampproject/toolbox-optimizer node lib/warmup.js

Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db AMP OPTIMIZER Downloaded latest AMP runtime data. npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/webpack/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1327 packages from 835 contributors and audited 1336 packages in 44.664s

91 packages are looking for funding run npm fund for details

found 5 vulnerabilities (4 low, 1 high) run npm audit fix to fix them, or npm audit for details Removing intermediate container 08036a204853 ---> 56150b05dbdc Step 5/8 : RUN npm run build ---> Running in 3956ca9860ba

zipline-next@2.9.0 build /opt/zipline next build && tsc -p .

Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db info - Creating an optimized production build... Attention: Next.js now collects completely anonymous telemetry regarding usage. This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: https://nextjs.org/telemetry

info - Compiled successfully info - Collecting page data... info - Generating static pages (0/11) info - Generating static pages (2/11) info - Generating static pages (5/11) info - Generating static pages (8/11) info - Generating static pages (11/11) info - Finalizing page optimization...

Page Size First Load JS ┌ ○ / 239 B 99.1 kB ├ /_app 0 B 98.8 kB ├ ○ /404 5.48 kB 104 kB ├ ● /dash 1.05 kB 357 kB ├ ● /dash/images 4.28 kB 360 kB ├ ○ /dash/statistics 2.44 kB 356 kB ├ ○ /dash/upload 15.4 kB 369 kB ├ ● /dash/urls 2.94 kB 360 kB ├ ○ /dash/users 4.45 kB 362 kB ├ ○ /user/login 4.33 kB 132 kB ├ ● /user/manage 2.18 kB 360 kB └ ○ /user/setup 2.46 kB 130 kB

λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) ○ (Static) automatically rendered as static HTML (uses no initial props) ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps) (ISR) incremental static regeneration (uses revalidate in getStaticProps)

Removing intermediate container 3956ca9860ba ---> bbe23839168f Step 6/8 : ENV NODE_ENV=production ---> Running in e75681ef027c Removing intermediate container e75681ef027c ---> ed24a4582f9c Step 7/8 : EXPOSE 8000 ---> Running in 2bbddab9bcde Removing intermediate container 2bbddab9bcde ---> 15c7b05270bc Step 8/8 : CMD ["node", "dist"] ---> Running in 520b412778c3 Removing intermediate container 520b412778c3 ---> 7774233226dd Successfully built 7774233226dd Successfully tagged zipline_zipline:latest WARNING: Image for service zipline was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build. Creating zipline_zipline_1 ... done


docker status

chchang@hqdc039:~/git/zipline$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e8a68b08a638 zipline_zipline "docker-entrypoint.s…" 2 minutes ago Exited (0) 2 minutes ago zipline_zipline_1


docker logs

chchang@hqdc039:~/git/zipline$ docker logs zipline_zipline_1 [4/20/2021 3:09:11 AM] [configuration] error: could not find a Zipline.toml file in /opt/zipline

diced commented 3 years ago

You need to create a Zipline.toml (you can use an example one from https://zipline.diced.wtf/docs/config/example/)

changchichung commented 3 years ago

can I generate Zipline.toml without install by npm i ? for example , I want to use sqllite as DB backend . but I dont know what's exactlly the syntax in config.

diced commented 3 years ago

can I generate Zipline.toml without install by npm i ? for example , I want to use sqllite as DB backend . but I dont know what's exactlly the syntax in config.

yes that's why I pointed towards the example config.