shlinkio / shlink-docker-image Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] A docker image to easily set up shlink on a container-based infrastructure
Home Page: https://hub.docker.com/r/shlinkio/shlink/
License: MIT License
[DEPRECATED] A docker image to easily set up shlink on a container-based infrastructure
Home Page: https://hub.docker.com/r/shlinkio/shlink/
License: MIT License
Default to shlink from cli
https://shlink.io/short-code-charset
Consider this env var one of the mandatory env vars.
Currently, charset an key are randomly generated when the container is run for the first time.
These values should be shared among all containers.
Note that it is still a good idea for versions previous to 1.17
Starting with version 1.16
Required when using multiple instances of shlink and updating the file using something like kubernetes CronJobs.
The image should also expose the volume.
Two new commands are going to be introduced on db namspace, which will enhance the database creation and database migration.
The entry point should now try to run them if they exist, and run the regular doctrine scripts instead.
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
Hello,
Thanks for your application, but I have an issue with the IP forwarding, despite my reverse proxy configuration, the IP is always: 172.17.0.0
The same for the referrer which is aways null.
Could you please help me?
Regards,
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! :)
Ref: #15 (comment)
On container start-up:
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.
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]
Currently, injected config file generates a random charset and secret when loaded. Since then shlink caches the merged config, it shouldn't be an issue.
However, it should keep the value if the cached config is deleted.
Next shlink release willnot require APCu. It will use an Array cache when APCu is not isntalled.
Check if this cache is trully shared between all swoole processes, and do not install APCu in that case, since an in-memory array will work the same way.
Add support for an env var, and document how to configure locks to use a redis server/cluster.
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.