Update deploy ocean 4.yml

master
omidshj 2024-11-10 16:41:25 +03:30
parent 1e142bc8cd
commit 7f39fa401e
1 changed files with 33 additions and 6 deletions

View File

@ -17,19 +17,46 @@
env: env:
SERVER_BASE_URL: "{{SERVER_BASE_URL}}" SERVER_BASE_URL: "{{SERVER_BASE_URL}}"
DEBUG: "{{DEBUG}}" DEBUG: "{{DEBUG}}"
IS_MFF: "{{IS_MF}}" IS_MF: "TRUE"
BASE_URL: "{{BASE_URL}}" BASE_URL: "{{BASE_URL}}"
HOST: "{{HOST}}" HOST: "{{HOST}}"
labels: labels:
traefik.enable: "true" traefik.enable: "true"
traefik.docker.network: "traefik" traefik.docker.network: "traefik"
traefik.http.routers.ocean.entrypoints: "web,websecure" traefik.http.routers.ocean.entrypoints: "web,websecure"
traefik.http.routers.ocean.rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.panel.omidshj.ir`) || HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.demo.omidshj.ir`)" traefik.http.routers.ocean.rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.demo.omidshj.ir`)"
traefik.http.services.ocean.loadbalancer.server.port: "3000" traefik.http.services.ocean.loadbalancer.server.port: "3000"
traefik.http.routers.ocean.tls: "true" traefik.http.routers.ocean.tls: "true"
traefik.http.routers.ocean.tls.certresolver: "letsencrypt" traefik.http.routers.ocean.tls.certresolver: "letsencrypt"
traefik.http.routers.ocean.service: "ocean" traefik.http.routers.ocean.service: "ocean"
traefik.http.routers.ocean.tls.domains[0].main: "panel.omidshj.ir" traefik.http.routers.ocean.tls.domains[0].main: "demo.omidshj.ir"
traefik.http.routers.ocean.tls.domains[0].sans: "*.panel.omidshj.ir" traefik.http.routers.ocean.tls.domains[0].sans: "*.demo.omidshj.ir"
traefik.http.routers.ocean.tls.domains[1].main: "demo.omidshj.ir" - name: Stop ocean_panel container if it exists
traefik.http.routers.ocean.tls.domains[1].sans: "*.demo.omidshj.ir" docker_container:
name: ocean_panel
state: absent
- name: Deploy ocean_panel Docker container
docker_container:
name: ocean_panel
image: ocean:{{semaphore_vars.task_details.incoming_version}}
state: started
restart_policy: always
networks:
- name: traefik
env:
SERVER_BASE_URL: "{{SERVER_BASE_URL}}"
DEBUG: "{{DEBUG}}"
IS_MF: "FALSE"
BASE_URL: "{{BASE_URL}}"
HOST: "{{HOST}}"
labels:
traefik.enable: "true"
traefik.docker.network: "traefik"
traefik.http.routers.oceanpanel.entrypoints: "web,websecure"
traefik.http.routers.oceanpanel.rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.panel.omidshj.ir`)"
traefik.http.services.oceanpanel.loadbalancer.server.port: "3000"
traefik.http.routers.oceanpanel.tls: "true"
traefik.http.routers.oceanpanel.tls.certresolver: "letsencrypt"
traefik.http.routers.oceanpanel.service: "oceanpanel"
traefik.http.routers.oceanpanel.tls.domains[0].main: "panel.omidshj.ir"
traefik.http.routers.oceanpanel.tls.domains[0].sans: "*.panel.omidshj.ir"