Comments (22)
Thanks!
from dockerswarm.rocks.
Oh ok good to know. Maybe I test some other services for the swarm tutorials.
from dockerswarm.rocks.
Thanks for aksing me, yes we can close it.
from dockerswarm.rocks.
I also tried this but also this results in a 404 error:
version: '3.3'
services:
thelounge:
image: thelounge/thelounge:latest
volumes:
- thelounge-data:/data
#- ~/data/thelounge:/var/opt/thelounge
networks:
- traefik-public
deploy:
placement:
constraints:
- node.role == manager
- node.labels.thelounge.thelounge-data == true
labels:
# - traefik.backend=thelounge
- traefik.enable=true
- traefik.frontend.rule=Host:${DOMAIN}
- traefik.port=4000
- traefik.docker.network=traefik-public
- traefik.tags=traefik-public
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
networks:
#- web
- traefik-public
networks:
traefik-public:
external: true
volumes:
thelounge-data:
any ideas what I have done wrong?
Thanks!
from dockerswarm.rocks.
Try indenting your whole labels
block so that it is under a deploy
block (with the deploy block at the same indentation level as in your last example). That got it working for me!
from dockerswarm.rocks.
Thanks you mean like:
version: '3.3'
services:
thelounge:
image: thelounge/thelounge:latest
volumes:
- thelounge-data:/data
#- ~/data/thelounge:/var/opt/thelounge
networks:
- traefik-public
labels:
# - traefik.backend=thelounge
- traefik.enable=true
- traefik.frontend.rule=Host:${DOMAIN}
- traefik.port=4000
- traefik.docker.network=traefik-public
- traefik.tags=traefik-public
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
networks:
#- web
- traefik-public
deploy:
placement:
constraints:
- node.role == manager
- node.labels.thelounge.thelounge-data == true
networks:
traefik-public:
external: true
volumes:
thelounge-data:
from dockerswarm.rocks.
No that is not what I meant.
from dockerswarm.rocks.
@noobcoder1983 what @rayrrr is saying is that you should put the labels inside the deploy
key, something like:
version: '3.3'
services:
thelounge:
image: thelounge/thelounge:latest
volumes:
- thelounge-data:/data
#- ~/data/thelounge:/var/opt/thelounge
networks:
- traefik-public
networks:
#- web
- traefik-public
deploy:
labels:
# - traefik.backend=thelounge
- traefik.enable=true
- traefik.frontend.rule=Host:${DOMAIN}
- traefik.port=4000
- traefik.docker.network=traefik-public
- traefik.tags=traefik-public
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
placement:
constraints:
- node.role == manager
- node.labels.thelounge.thelounge-data == true
networks:
traefik-public:
external: true
volumes:
thelounge-data:
Also, as your app seems to be running on port 9000
you probably should declare it as such:
version: '3.3'
services:
thelounge:
image: thelounge/thelounge:latest
volumes:
- thelounge-data:/data
#- ~/data/thelounge:/var/opt/thelounge
networks:
- traefik-public
networks:
#- web
- traefik-public
deploy:
labels:
# - traefik.backend=thelounge
- traefik.enable=true
- traefik.frontend.rule=Host:${DOMAIN}
- traefik.port=9000
- traefik.docker.network=traefik-public
- traefik.tags=traefik-public
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
placement:
constraints:
- node.role == manager
- node.labels.thelounge.thelounge-data == true
networks:
traefik-public:
external: true
volumes:
thelounge-data:
from dockerswarm.rocks.
Ok thank you very much for your hints. I will try that :-) When the lounge uses that port and another container is using that port too. What could be the best way to edit thelounge port in the config.js?
from dockerswarm.rocks.
See my response here: #4 (comment)
from dockerswarm.rocks.
Nope that does not help. I tried this:
export NODE_ID=$(docker info -f '{{.Swarm.NodeID}}')
docker node update --label-add thelounge.thelounge-data=true $NODE_ID
with the new .yml file you posted above. Error 404 appears again. :-(
I'm desperate and I really don't know what to do.
from dockerswarm.rocks.
@noobcoder1983 I think I have a gift for you π
https://dockerswarm.rocks/thelounge/
from dockerswarm.rocks.
@tiangolo Thank you so much for your efforts and for the gift. So I was probably close when I compare the compose files. Well, just next to it is also over.
Oh, and it works fine. Hm if I can make it to get run Gitea (https://hub.docker.com/r/gitea/gitea)?
from dockerswarm.rocks.
Yep, the process would be similar for Gitea.
from dockerswarm.rocks.
Hmm I tried that:
version: '3.3'
services:
app:
image: gitea/gitea:latest
volumes:
- gitea-data:/data
networks:
- traefik-public
deploy:
placement:
constraints:
- node.labels.gitea.gitea-data == true
labels:
- traefik.frontend.rule=Host:${DOMAIN}
- traefik.enable=true
- traefik.port=9000
- traefik.tags=traefik-public
- traefik.docker.network=traefik-public
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
#enviroment:
- USER_UID=1000
- USER_GID=1000
#ports:
- "2221:22"
networks:
traefik-public:
external: true
volumes:
gitea-data:
But I am always getting the error:
Bad gateway
from traefik
from dockerswarm.rocks.
Oh had the wrong port with 3000 it works, my failure.
And here the correct gitea.yml file:
version: '3.3'
services:
app:
image: gitea/gitea:latest
volumes:
- gitea-data:/data
networks:
- traefik-public
deploy:
placement:
constraints:
- node.labels.gitea.gitea-data == true
labels:
- traefik.frontend.rule=Host:${DOMAIN}
- traefik.enable=true
- traefik.port=3000
- traefik.tags=traefik-public
- traefik.docker.network=traefik-public
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
#enviroment:
- USER_UID=1000
- USER_GID=1000
#ports:
- "2221:22"
networks:
traefik-public:
external: true
volumes:
gitea-data:
Maybe you want to add it to your website. After deploying go to gitea instance and click on register to activate admin account for further usage.
from dockerswarm.rocks.
Great! I'll add Gitea later (unless a PR comes first π ).
from dockerswarm.rocks.
Ok cool thanks. Hmm PR?
from dockerswarm.rocks.
A Pull Request: https://help.github.com/en/articles/creating-a-pull-request
from dockerswarm.rocks.
Excuse my unknowing π±
I hope in the future I will learn more and more about github. π
So with a pull request I could add my knowledge to your repo?
from dockerswarm.rocks.
No worries!
Yep, with a pull request you could add it.
from dockerswarm.rocks.
I think we can close this issue now, right @noobcoder1983 ?
from dockerswarm.rocks.
Related Issues (20)
- Swarmpit setup fails - http://db:5984 host unreachable HOT 4
- Service placement on different node makes it unreachable HOT 2
- Swarmpit on ARM HOT 1
- Let's encrypt issue HOT 2
- Setting up hostname didn't work
- 404 for grafana / prometheus requests HOT 2
- Traefik example and its labels HOT 1
- Suggestion: Start with simple stack to get Portainer running with Caddy HOT 2
- Traefik on 2 Manager Nodes HOT 4
- What are the things to look when traefik.<domain name> is not loading? HOT 2
- Any recommended FOSS projects for Docker Swarm Mode deployments? HOT 3
- Traefik : redirect all http to https HOT 4
- n/a
- nginx loadbalancer
- Custom SSL Certificate HOT 3
- [feature request] dark mode for dockerswarm.rocks HOT 1
- Traefik redundancy and DNS configuration HOT 3
- Feature Request: Explain the roles of Portainer and Swarmpit (better) HOT 1
- Is dockerswarm.rocks still maintained? HOT 14
- Everything depends on the first node despite being in swarm mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerswarm.rocks.