54 lines
3.0 KiB
YAML
54 lines
3.0 KiB
YAML
|
version: '3'
|
||
|
services:
|
||
|
|
||
|
server:
|
||
|
image: "ubuntu:rolling"
|
||
|
restart: "always"
|
||
|
volumes:
|
||
|
- .:/picluster
|
||
|
- ./docker-compose-multinode.config.json:/picluster/config.json
|
||
|
- ./picluster-pm2.config-example.json:/picluster/picluster-pm2.config.json
|
||
|
ports:
|
||
|
- "3003:3003"
|
||
|
networks:
|
||
|
- picluster
|
||
|
working_dir: /picluster
|
||
|
command: su -s /bin/sh -lc "export DEBIAN_FRONTEND='noninteractive';apt-get update; apt-get install -y npm nodejs build-essential containerd docker.io containerd runc git python3 make g++ docker procps supervisor; cd /picluster;npm install;cd /picluster/server;/usr/bin/dockerd&npm install;cd /picluster/agent;npm install;cd /picluster/web;npm install;cd /picluster;printf \"[supervisord]\n\n[program:dockerd]\ncommand=dockerd\" > /etc/supervisor.conf; npm install -g pm2;supervisord -c /etc/supervisor.conf; npm install --production --unsafe-perm; pm2-docker start /picluster/picluster-pm2.config.json"
|
||
|
environment:
|
||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||
|
privileged: true
|
||
|
|
||
|
node2:
|
||
|
image: "ubuntu:rolling"
|
||
|
restart: "always"
|
||
|
volumes:
|
||
|
- .:/picluster
|
||
|
- ./docker-compose-multinode.config.json:/picluster/config.json
|
||
|
- ./picluster-pm2.config-example.json:/picluster/picluster-pm2.config.json
|
||
|
networks:
|
||
|
- picluster
|
||
|
working_dir: /picluster
|
||
|
command: su -s /bin/sh -lc "export DEBIAN_FRONTEND='noninteractive';apt-get update; apt-get install -y npm nodejs build-essential containerd docker.io containerd runc git python3 make g++ docker procps supervisor; cd /picluster;npm install;cd /picluster/server;/usr/bin/dockerd&npm install;cd /picluster/agent;npm install;cd /picluster/web;npm install;cd /picluster;printf \"[supervisord]\n\n[program:dockerd]\ncommand=dockerd\" > /etc/supervisor.conf; npm install -g pm2;supervisord -c /etc/supervisor.conf; npm install --production --unsafe-perm; pm2-docker start /picluster/picluster-pm2.config.json"
|
||
|
environment:
|
||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||
|
privileged: true
|
||
|
|
||
|
node3:
|
||
|
image: "ubuntu:rolling"
|
||
|
restart: "always"
|
||
|
volumes:
|
||
|
- .:/picluster
|
||
|
- ./docker-compose-multinode.config.json:/picluster/config.json
|
||
|
- ./picluster-pm2.config-example.json:/picluster/picluster-pm2.config.json
|
||
|
networks:
|
||
|
- picluster
|
||
|
working_dir: /picluster
|
||
|
command: su -s /bin/sh -lc "export DEBIAN_FRONTEND='noninteractive';apt-get update; apt-get install -y npm nodejs build-essential containerd docker.io containerd runc git python3 make g++ docker procps supervisor; cd /picluster;npm install;cd /picluster/server;/usr/bin/dockerd&npm install;cd /picluster/agent;npm install;cd /picluster/web;npm install;cd /picluster;printf \"[supervisord]\n\n[program:dockerd]\ncommand=dockerd\" > /etc/supervisor.conf; npm install -g pm2;supervisord -c /etc/supervisor.conf; npm install --production --unsafe-perm; pm2-docker start /picluster/picluster-pm2.config.json"
|
||
|
environment:
|
||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||
|
privileged: true
|
||
|
|
||
|
|
||
|
networks:
|
||
|
picluster:
|
||
|
|