Giter Club home page Giter Club logo

shlink-docker-image's People

Contributors

acelaya avatar jasoniangreen avatar peterdavehello avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

shlink-docker-image's Issues

SQLite persistent storage

Hi there,
I'm looking for a way to use the Shlink with the SQLite but with the persistent storage for at least a DB (database.sqlite). Normally it's stored on the docker container space, which might be dangerous when you do messing around the stack.

Also I've created a docker-compose.yml with additional nginx setup (with let's encrypt and so on), so it would be great to have a possibility to define a mountpoint (a volume) with data like this (see the commented part):

version: '3'
services:
  nginx:
    build: .
    ports:
     - "80:80"
     - "443:443"
    volumes:
     - ./data/nginx:/etc/nginx/conf.d
     - ./data/certbot/conf:/etc/letsencrypt
     - ./data/certbot/www:/var/www/certbot
    command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
  certbot:
    image: "certbot/certbot"
    volumes:
      - ./data/certbot/conf:/etc/letsencrypt
      - ./data/certbot/www:/var/www/certbot
    entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
  shlink:
    image: "shlinkio/shlink"
    # volumes:
    #   - ./data/shlink/:/etc/shlink/data/
    environment:
    - SHORT_DOMAIN_HOST=1y.yt
    - SHORT_DOMAIN_SCHEMA=https
    - DB_DRIVER=sqlite

Unfortunately it doesn't work, because this volume mountpoint have to be there before the build, so probably a change in main Dockerfile is needed.

Do you have any ideas how to do this right?

Cheers,
Matt

Change exposed Swool Port to 80 instead of 8080

In your Dockerfile, Swool gets startet on port 8080.

I want to use your container in a docker-compose setup in combination with
nginx-reverse-proxy setup from evertramos.
Unfortunately, this reverse proxy needs the container to publish its service on port 80 and i can't change that.

So my question is: Could you please change the port of your docker container to 80?
If people want to expose a different port on the host machine, they can use regular port mapping, like "8080:80" in docker-compose.

The problem is, that the "expose" keyword in docker-compose allows me to expose one port of a container, but it does not allow me to do a mapping of your internal port 8080 to my required port 80.

If you don't want to change the port, I must recreate your docker-image, which would be more work than I would like to do.
However, if you have a better idea on how to make the port customizable from the outside, i'm very interested.

Please ask, when you have questions! :)

Make entry point include migrations and proxy generation

On container start-up:

  • Delete cached config file.
  • Parse any incomming config (container will allow a config file to be parsed, with customizable options)
  • Run migrations
  • Generate proxies

Then, if no further params were provided, run public/index.php, which will run swoole server. If any param was provided, run cli tool instead, providing all of those params.

Disable config cache

Since swoole keeps loaded files in memory and shares them between requests, caching merged config files does not really add any performance improvement.

Instead, when using the docker image, containers are not stateless. Dropping this cache will solve this issue.


['config_cache_enabled' => false]

Updates in Dockerfile

  • Bump base docker image to latest PHP 7.3.*
  • Use Shlink 1.18.0 as the default shlink version

Update docs using simplified config

Add a note stating that the simplified config won't work with versions previous to 1.17.0, and include a link to config inside the project, which uses full structure.

ECS Deployment Failing

if [ -z "$(ls -A data/proxies)" ]; then

The above if block is causing all updated deployments of shlink in an ECS environment to fail. I'm trying to figure out why this needs to be run every time on startup as anytime a container is pulled in an orchestrated environment it is likely that it will be pulled and started in a completely clean state. Because of that, the directory it's looking for isn't there while the DB has been initialized and has (or should have) the correct schema. How do I go about making this work for my ECS environment?

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.