deploy inception
parent
c6296a8362
commit
36b8bb4849
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
- name: update inception
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
# - name: Change to the app directory and update the repository
|
||||||
|
# git:
|
||||||
|
# repo: 'https://gt.eron.co/eron/inception.git' # Replace with your repository URL
|
||||||
|
# dest: /root/code/inception
|
||||||
|
# version: master
|
||||||
|
# register: git_result
|
||||||
|
- name: Go to the application directory
|
||||||
|
command: chdir=/root/code/inception git pull origin master
|
||||||
|
register: git_result
|
||||||
|
|
||||||
|
- name: Build docker image if there were changes
|
||||||
|
docker_image:
|
||||||
|
source: build
|
||||||
|
build:
|
||||||
|
path: /root/code/inception
|
||||||
|
name: inception
|
||||||
|
tag: "{{semaphore_vars.task_details.target_version}}"
|
||||||
|
when: git_result.changed
|
|
@ -0,0 +1,56 @@
|
||||||
|
---
|
||||||
|
- name: update inception
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Stop Inception container if it exists
|
||||||
|
docker_container:
|
||||||
|
name: inception
|
||||||
|
state: absent
|
||||||
|
- name: Deploy Inception Docker container
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Run Inception container
|
||||||
|
docker_container:
|
||||||
|
name: inception
|
||||||
|
image: inception:{{semaphore_vars.task_details.incoming_version}}
|
||||||
|
state: started
|
||||||
|
restart_policy: always
|
||||||
|
networks:
|
||||||
|
- name: traefik
|
||||||
|
- name: inception
|
||||||
|
- name: redis
|
||||||
|
- name: rabbitmq
|
||||||
|
- name: minio
|
||||||
|
- name: mongo
|
||||||
|
exposed_ports:
|
||||||
|
- "3000"
|
||||||
|
env:
|
||||||
|
sdxl_endpoint: "{{ sdxl_endpoint }}"
|
||||||
|
PORT: "{{ PORT }}"
|
||||||
|
ACTION_SERVICE: "true"
|
||||||
|
CONFIG_SERVICE: "false"
|
||||||
|
PRODUCER_SERVICE: "true"
|
||||||
|
QUERY_SERVICE: "true"
|
||||||
|
RABBIT_MQ_CONSUMER: "true"
|
||||||
|
AUTH_SERVICE: "true"
|
||||||
|
MONGODB_URI: "{{ MONGODB_URI }}"
|
||||||
|
ELASTICSEARCH_URI: "{{ ELASTICSEARCH_URI }}"
|
||||||
|
RABBIT_MQ_URI: "{{ RABBIT_MQ_URI }}"
|
||||||
|
REDIS_URI: "{{ REDIS_URI }}"
|
||||||
|
MINIO_URL: "{{ MINIO_URL }}"
|
||||||
|
MINIO_ENDPOINT: "{{ MINIO_ENDPOINT }}"
|
||||||
|
MINIO_PORT: "{{ MINIO_PORT }}"
|
||||||
|
MINIO_USE_SSL: "{{ MINIO_USE_SSL }}"
|
||||||
|
MINIO_ACCESS_KEY: "{{ MINIO_ACCESS_KEY }}"
|
||||||
|
MINIO_SECRET_KEY: "{{ MINIO_SECRET_KEY }}"
|
||||||
|
labels:
|
||||||
|
traefik.enable: "true"
|
||||||
|
traefik.docker.network: "traefik"
|
||||||
|
traefik.http.routers.inception.entrypoints: "web,websecure"
|
||||||
|
traefik.http.routers.inception.rule: "Host(`inception.eron.co`) || HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.inception.eron.co`)"
|
||||||
|
traefik.http.services.inception.loadbalancer.server.port: "3000"
|
||||||
|
traefik.http.routers.inception.tls: "true"
|
||||||
|
traefik.http.routers.inception.tls.certresolver: "letsencrypt"
|
||||||
|
traefik.http.routers.inception.service: "inception"
|
||||||
|
traefik.http.routers.inception.tls.domains[0].main: "inception.eron.co"
|
||||||
|
traefik.http.routers.inception.tls.domains[0].sans: "*.inception.eron.co"
|
Loading…
Reference in New Issue