-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help setup run cronicle in multi server with centos7, docker, nginx #791
Comments
config.json{
} |
Hmmm, I have no idea, but do check out @mikeTWC1984's fork over at: https://github.com/cronicle-edge/cronicle-edge/tree/main/Docker He seems to have multi-server docker figured out quite nicely (using swarm). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Hi guys,
I'm new bie of docker
I want to setup cronicle running on 2 servers with load balancer nginx. But now I get error: WebSocket connection to 'ws://172.19.0.2:3012/socket.io/?EIO=4&transport=websocket' failed: WebSocket is closed before the connection is established.
My Setup
Image of cronicle:
FROM python:3.6
ARG CRONICLE_VERSION=v0.8.28
ENV CRONICLE_VERSION=${CRONICLE_VERSION}
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
&& apt-get install -y nodejs
&& curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
&& apt-get update && apt-get install -y yarn
RUN curl -s "https://raw.githubusercontent.com/jhuckaby/Cronicle/${CRONICLE_VERSION}/bin/install.js" | node
&& cd /opt/cronicle
EXPOSE 3012
EXPOSE 3014
ENTRYPOINT ["/docker-entrypoint.sh"]
docker-entrypoint.sh
set -e
if [ "$IS_MASTER" = "0" ]
then
echo "Running SLAVE server"
else
echo "Running MASTER server"
/opt/cronicle/bin/control.sh setup
fi
/opt/cronicle/bin/control.sh start
while true;
do
sleep 30;
/opt/cronicle/bin/control.sh status
done
docker-compose.yml in 172.16.10.104
version: '3.2'
services:
loadbalancer:
container_name: loadbalancer
hostname: loadbalancer
image: nginx
volumes:
- ./loadbalancer/nginx.conf:/etc/nginx/nginx.conf
tty: true
links:
- cronicle1
ports:
- 8080:8080
cronicle1:
container_name: cronicle1
hostname: cronicle1
image: cronicle-base
#restart: always
volumes:
- ./sample_conf/config.json:/opt/cronicle/conf/config.json
- ./sample_conf/emails:/opt/cronicle/conf/emails
- ./docker-entrypoint.sh:/docker-entrypoint.sh
- ./backend/cronicle/data:/opt/cronicle/data
entrypoint: /docker-entrypoint.sh
environment:
IS_MASTER: "1"
docker-compose.yml in 172.16.10.105
version: '3.2'
services:
cronicle2:
container_name: cronicle2
hostname: cronicle2
image: cronicle-base
#restart: always
volumes:
- ./sample_conf/config.json:/opt/cronicle/conf/config.json
- ./sample_conf/emails:/opt/cronicle/conf/emails
- ./docker-entrypoint.sh:/docker-entrypoint.sh
- ./backend/cronicle/data:/opt/cronicle/data
entrypoint: /docker-entrypoint.sh
environment:
IS_MASTER: "0"
nginx loadbalancer config
events { worker_connections 1024; }
http {
upstream cronicles {
server cronicle1:3012;
server 172.16.10.105:3012;
}
}
error
when i access to 172.16.10.104:8080:
The text was updated successfully, but these errors were encountered: