diff --git a/.env.production b/.env.production index f93ceaf..f5603e3 100644 --- a/.env.production +++ b/.env.production @@ -1 +1 @@ -VITE_BASE_URL = 'https://lpt.cat-shark.xyz/api' \ No newline at end of file +VITE_BASE_URL=/api diff --git a/Jenkinsfile b/Jenkinsfile index d0cf43f..e305d90 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,6 @@ pipeline { environment { IMAGE_NAME = 'lpt-fe:0.0' CONTAINER_NAME = 'LPT_FE' - HOST_PORT = '8157' CONTAINER_PORT = '80' } stages { @@ -50,9 +49,16 @@ pipeline { agent any steps { sh ''' + docker network create traefik-public || true docker rm -f $CONTAINER_NAME || true docker run -d --name $CONTAINER_NAME \\ - -p $HOST_PORT:$CONTAINER_PORT \\ + --network traefik-public \\ + --label "traefik.enable=true" \\ + --label "traefik.http.routers.lpt-fe.rule=Host(`lpt.cat-shark.xyz`)" \\ + --label "traefik.http.routers.lpt-fe.entrypoints=websecure" \\ + --label "traefik.http.routers.lpt-fe.tls.certresolver=le" \\ + --label "traefik.http.routers.lpt-fe.service=lpt-fe" \\ + --label "traefik.http.services.lpt-fe.loadbalancer.server.port=$CONTAINER_PORT" \\ --health-cmd="curl -f http://localhost:80 || exit 1" \\ --health-interval=5s \\ --health-retries=3 \\