Giter Site home page Giter Site logo

Comments (9)

muety avatar muety commented on September 23, 2024 1

I just fixed the image upload problem (see #27) in version 1.3.3.

from anchr.

muety avatar muety commented on September 23, 2024

This is caused by the fact that your /tmp and /var are on different file systems / partitions. I have to get that fixed somehow. Thanks for bringing it up. Quick fix would be to set your upload path to some directory within the same file system as /tmp.

EDIT: Short explanation here

from anchr.

muety avatar muety commented on September 23, 2024

The link shortening problem might be a configuration issue. Can you please tell me:

  1. Which version of Anchr are you using (see package.json)
  2. What did you set ANCHR_GOOGLE_API_KEY to in your .env file?

from anchr.

tehniemer avatar tehniemer commented on September 23, 2024

I've forked your repo and used it to build the docker image, so it should be the version that's in the Dockerfile. Here's my docker-compose snippet. I disabled signup after I created my user. The API key came from the developers console.

## Anchr - Toolbox for tiny tasks on the internet, including bookmark collections, URL shortening and (encrypted) image uploads
  anchr:
    image: tehniemer/anchr:latest
    container_name: anchr
    restart: always
    build: ./
    networks:
      - proxy
      - database
    depends_on:
      - mongo
    security_opt:
      - no-new-privileges:true
#    ports:
#      - '$ANCHR_PORT:9000'
    volumes:
      - '$DOCKER_DIR/anchr:/app/data'
      - '$CLOUD_DIR/Anchr:/var/data/anchr'
    environment:
      PORT: 9000
      ANCHR_DB_HOST: $MONGO_HOST
      ANCHR_DB_PORT: 27017
      ANCHR_DB_NAME: $ANCHR_MONGO
      ANCHR_DB_USER: $ANCHR_MONGO
      ANCHR_DB_PASSWORD: $ANCHR_MONGO_PASS
      ANCHR_GOOGLE_API_KEY: $ANCHR_GOOGLE_API_KEY
      ANCHR_GOOGLE_CLIENT_ID: $ANCHR_GOOGLE_CLIENT_ID
      ANCHR_GOOGLE_SECRET: $ANCHR_GOOGLE_SECRET
      LISTEN_ADDR: 0.0.0.0
      ANCHR_ALLOW_SIGNUP: 'false'
    labels:
      - 'traefik.enable=true'
      ## HTTP Routers
      - 'traefik.http.routers.anchr-rtr.entrypoints=https'
      - 'traefik.http.routers.anchr-rtr.rule=HostHeader(`anchr.$DOMAINNAME`)'
      - 'traefik.http.routers.anchr-rtr.tls=true'
      ## Middlewares
#      - 'traefik.http.routers.anchr-rtr.middlewares=chain-no-auth@file' #No Authentication
#      - 'traefik.http.routers.anchr-rtr.middlewares=chain-basic-auth@file' #Basic Authentication
#      - 'traefik.http.routers.anchr-rtr.middlewares=chain-oauth@file' #Google OAuth 2.0
#      - 'traefik.http.routers.anchr-rtr.middlewares=chain-organizr@file' #Organizr Authentication
      - 'traefik.http.routers.anchr-rtr.middlewares=chain-authelia@file' #Authelia Authentication
      ## HTTP Services
      - 'traefik.http.routers.anchr-rtr.service=anchr-svc'
      - 'traefik.http.services.anchr-svc.loadbalancer.server.port=9000'

## MongoDB - A general purpose, document-based, distributed database
  mongo:
    image: mongo:3.4
    container_name: mongo
    restart: always
    networks:
      - database
    security_opt:
      - no-new-privileges:true
    volumes:
      - '$DOCKER_DIR/mongo/db:/data/db'
      - '$DOCKER_DIR/mongo/configdb:/data/configdb'
      - '$DOCKER_DIR/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro'
    environment:
      - MONGO_INITDB_ROOT_USERNAME=$MONGO_USER
      - MONGO_INITDB_ROOT_PASSWORD=$MONGO_PASS
      - MONGO_INITDB_DATABASE=$ANCHR_MONGO
      - DB_USER=$ANCHR_MONGO
      - DB_PASSWORD=$ANCHR_MONGO_PASS

from anchr.

tehniemer avatar tehniemer commented on September 23, 2024

Image upload is working in the 1.3.3, but not link shortening.

from anchr.

muety avatar muety commented on September 23, 2024

Please check the version and make sure it's 1.3.3. If it's not, please pull and rebuild the Docker images.

Also, before running the Docker Compose command, don't forget to do source env.sh.

I'm pretty sure the shortlink problem is related to Google Safe Browse API. Maybe just try to disable it by setting ANCHR_GOOGLE_API_KEY=''. Everytime you change something in .env, you have to do the source command again.

from anchr.

tehniemer avatar tehniemer commented on September 23, 2024

Disabling the Google API fixed the link shortening issue.

from anchr.

muety avatar muety commented on September 23, 2024

Alright, so do you mind if I close this issue then?

from anchr.

tehniemer avatar tehniemer commented on September 23, 2024

Seems to be fixed, close it up.

from anchr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.