mirror of
https://github.com/Dokploy/website
synced 2025-06-26 18:16:01 +00:00
feat: implement Docker service creation for PostgreSQL and Redis in dokploy installation script
This commit is contained in:
parent
6a9db932b6
commit
f150a13e27
@ -106,8 +106,24 @@ install_dokploy() {
|
||||
|
||||
chmod 777 /etc/dokploy
|
||||
|
||||
docker pull postgres:16
|
||||
docker pull redis:7
|
||||
docker service create \
|
||||
--name dokploy-postgres \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--env POSTGRES_USER=dokploy \
|
||||
--env POSTGRES_DB=dokploy \
|
||||
--env POSTGRES_PASSWORD=amukds4wi9001583845717ad2 \
|
||||
--mount type=volume,source=dokploy-postgres-database,target=/var/lib/postgresql/data \
|
||||
postgres:16
|
||||
|
||||
|
||||
docker service create \
|
||||
--name dokploy-redis \
|
||||
--constraint 'node.role==manager' \
|
||||
--network dokploy-network \
|
||||
--mount type=volume,source=redis-data-volume,target=/data \
|
||||
redis:7
|
||||
|
||||
docker pull traefik:v3.1.2
|
||||
docker pull dokploy/dokploy:feature
|
||||
|
||||
@ -127,6 +143,33 @@ install_dokploy() {
|
||||
-e ADVERTISE_ADDR=$advertise_addr \
|
||||
dokploy/dokploy:feature
|
||||
|
||||
|
||||
docker run -d \
|
||||
--name dokploy-traefik \
|
||||
--network dokploy-network \
|
||||
--restart always \
|
||||
-v /etc/dokploy/traefik/traefik.yml:/etc/traefik/traefik.yml \
|
||||
-v /etc/dokploy/traefik/dynamic:/etc/dokploy/traefik/dynamic \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-p 80:80/tcp \
|
||||
-p 443:443/tcp \
|
||||
-p 443:443/udp \
|
||||
traefik:v3.1.2
|
||||
|
||||
|
||||
# docker service create \
|
||||
# --name dokploy-traefik \
|
||||
# --constraint 'node.role==manager' \
|
||||
# --network dokploy-network \
|
||||
# --mount type=bind,source=/etc/dokploy/traefik/traefik.yml,target=/etc/traefik/traefik.yml \
|
||||
# --mount type=bind,source=/etc/dokploy/traefik/dynamic,target=/etc/dokploy/traefik/dynamic \
|
||||
# --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
|
||||
# --publish mode=host,published=443,target=443 \
|
||||
# --publish mode=host,published=80,target=80 \
|
||||
# --publish mode=host,published=443,target=443,protocol=udp \
|
||||
# traefik:v3.1.2
|
||||
|
||||
|
||||
GREEN="\033[0;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
BLUE="\033[0;34m"
|
||||
|
Loading…
Reference in New Issue
Block a user