-
-
Save laruche/3286f31fe604e04711eb0a7965855948 to your computer and use it in GitHub Desktop.
captainVersion: '4' | |
documentation: Read the documentation @ https://shlink.io/documentation/ | |
description: shlink is a URL shortener which provides both REST and CLI interfaces | |
to interact with it. | |
services: | |
"$$cap_appname": | |
image: shlinkio/shlink:$$cap_shlink_version | |
containerHttpPort: '8080' | |
volumes: | |
- "$$cap_appname-config:/etc/shlink/config/params" | |
restart: always | |
caproverOneClickApp: | |
variables: | |
- id: "$$cap_shlink_version" | |
label: shlink version tag | |
description: Checkout their docker page for the valid tags @ https://hub.docker.com/r/shlinkio/shlink/tags | |
defaultValue: 2.0.5 | |
instructions: | |
start: shlink is a self-hosted url shortener server with a web interface. | |
end: shlink is deployed and available as $$cap_appname. | |
displayName: 'Shlink' |
I tried it, yet for me does manages to get to a 404 missing page, when I turn on http to https is back on 502 error.
Yes, @uhlhosting. That is the place you need to set port to 8080.
The 404 page IS the application running correctly.
Your next step I believe is to log into your server via SSH and find the container to run the command to generate the API key that you will use to begin using this application, as outlined in the official docs for this application.
Some applications will generate a new API key on the first run and reveal it early in the logs but this application is not one of them. They designed it so you have to run a command against a running container. Sadly, the name is not predictable so you have to find the container name by running another command.
Once you SSH into your machine running Caprover, run docker ps ls | grep shlink
to find the container name.
Then run docker exec -it my_shlink shlink api-key:generate
, replacing "my_shlink" with the unique name of your container, as outlined in this document: https://shlink.io/documentation/install-docker-image/.
Like so:
@maietta thanks for the explaining, I managed to generate the API key too, yet still when I add it in the web ui app, it gives error.
I think I got it working in app.shlink.to, would be nice to add this too in caprover.
Hi @maietta You mean here?