ops
parent
3c537fba27
commit
d5552efdfc
|
@ -1,3 +1,3 @@
|
|||
.DS_*
|
||||
password
|
||||
.DS*
|
||||
.DS_Store
|
|
@ -8,10 +8,10 @@
|
|||
src: template/nginx-server-block.j2
|
||||
dest: /tmp/new-nginx-server-block.{{item.server_name}}.conf
|
||||
with_items:
|
||||
- server_name: tetris.game.igarson.app
|
||||
- server_name: doz.game.igarson.app
|
||||
server_config: ""
|
||||
service_port: 6005
|
||||
conf_file: games.conf
|
||||
service_port: 6006
|
||||
conf_file: games.conf
|
||||
|
||||
|
||||
- name: append /tmp/new-nginx-server-block.conf to specific conf
|
||||
|
@ -19,20 +19,20 @@
|
|||
cat /tmp/new-nginx-server-block.{{item.server_name}}.conf >> /etc/nginx/sites-available/{{ item.conf_file }}
|
||||
rm -rf /tmp/new-nginx-server-block.{{item.server_name}}.conf
|
||||
with_items:
|
||||
- server_name: tetris.game.igarson.app
|
||||
- server_name: doz.game.igarson.app
|
||||
server_config: ""
|
||||
service_port: 6005
|
||||
conf_file: games.conf
|
||||
service_port: 6006
|
||||
conf_file: games.conf
|
||||
|
||||
|
||||
- name: encrypt all domains
|
||||
shell: |
|
||||
certbot --nginx -d {{item.server_name}} -n --redirect
|
||||
with_items:
|
||||
- server_name: tetris.game.igarson.app
|
||||
- server_name: doz.game.igarson.app
|
||||
server_config: ""
|
||||
service_port: 6005
|
||||
conf_file: games.conf
|
||||
service_port: 6006
|
||||
conf_file: games.conf
|
||||
|
||||
- name: Reload nginx to activate specified site
|
||||
service: name=nginx state=restarted
|
||||
|
@ -41,7 +41,7 @@
|
|||
cron:
|
||||
name: renew_certificates
|
||||
special_time: weekly
|
||||
job: certbot renew --post-hook "systemctl reload nginx"
|
||||
job: certbot renew --post-hook "systemctl reload nginx"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
{{item.service_name}}:
|
||||
image: {{item.registry}}
|
||||
environment:
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
6003 quiz ==> must change
|
||||
6023 api quiz ==> must change
|
||||
6005 tetris
|
||||
6006 doz
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
mongoprimary:27017
|
||||
mongosecondary:27017
|
||||
mongoarbiter:27017
|
||||
pg-0:5432
|
||||
pg-1:5432
|
||||
rabbitmq:5672
|
||||
redismaster:6379
|
||||
ls:8010
|
||||
core:8080
|
||||
yaus:8000
|
||||
menu:80
|
||||
admin:80
|
||||
capitan:80
|
||||
website:3000
|
||||
twentyfortyeight:80
|
||||
sudoku:80
|
||||
tetris:80
|
||||
doz:80
|
|
@ -0,0 +1 @@
|
|||
archive.gz
|
|
@ -5,20 +5,19 @@ networks:
|
|||
external: true
|
||||
|
||||
volumes:
|
||||
mongoprimary-data:
|
||||
mongosecondary-data:
|
||||
mongo0:
|
||||
|
||||
services:
|
||||
mongoprimary:
|
||||
image: registry.vnfco.ir/library/bitnami/mongodb:4.4.11-debian-10-r5
|
||||
volumes:
|
||||
- mongoprimary-data:/bitnami/mongodb
|
||||
- mongo0:/bitnami/mongodb
|
||||
environment:
|
||||
- MONGODB_REPLICA_SET_MODE=primary
|
||||
- MONGODB_REPLICA_SET_NAME=igrep
|
||||
# - MONGODB_REPLICA_SET_MODE=primary
|
||||
# - MONGODB_REPLICA_SET_NAME=igrep
|
||||
- MONGODB_ADVERTISED_HOSTNAME=mongoprimary
|
||||
- MONGODB_ROOT_PASSWORD=cWv1WQvWEp+LPdax9We/M6PeT7KgyTE9zKmC5y1ieqz4JtpLiVifJrQg0VHYhE6l
|
||||
- MONGODB_REPLICA_SET_KEY=keyissetforlocalreplica
|
||||
# - MONGODB_REPLICA_SET_KEY=keyissetforlocalreplica
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
|
@ -37,61 +36,61 @@ services:
|
|||
- mother
|
||||
|
||||
|
||||
mongosecondary:
|
||||
image: registry.vnfco.ir/library/bitnami/mongodb:4.4.11-debian-10-r5
|
||||
environment:
|
||||
- MONGODB_REPLICA_SET_MODE=secondary
|
||||
- MONGODB_REPLICA_SET_NAME=igrep
|
||||
- MONGODB_ADVERTISED_HOSTNAME=mongosecondary
|
||||
- MONGODB_INITIAL_PRIMARY_HOST=mongoprimary
|
||||
- MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017
|
||||
- MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=cWv1WQvWEp+LPdax9We/M6PeT7KgyTE9zKmC5y1ieqz4JtpLiVifJrQg0VHYhE6l
|
||||
- MONGODB_REPLICA_SET_KEY=keyissetforlocalreplica
|
||||
volumes:
|
||||
- mongosecondary-data:/bitnami/mongodb
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
order: start-first
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
max_attempts: 3
|
||||
window: 120s
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
ports:
|
||||
- "27012:27017"
|
||||
networks:
|
||||
- mother
|
||||
# mongosecondary:
|
||||
# image: registry.vnfco.ir/library/bitnami/mongodb:4.4.11-debian-10-r5
|
||||
# environment:
|
||||
# - MONGODB_REPLICA_SET_MODE=secondary
|
||||
# - MONGODB_REPLICA_SET_NAME=igrep
|
||||
# - MONGODB_ADVERTISED_HOSTNAME=mongosecondary
|
||||
# - MONGODB_INITIAL_PRIMARY_HOST=mongoprimary
|
||||
# - MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017
|
||||
# - MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=cWv1WQvWEp+LPdax9We/M6PeT7KgyTE9zKmC5y1ieqz4JtpLiVifJrQg0VHYhE6l
|
||||
# - MONGODB_REPLICA_SET_KEY=keyissetforlocalreplica
|
||||
# volumes:
|
||||
# - mongosecondary-data:/bitnami/mongodb
|
||||
# deploy:
|
||||
# update_config:
|
||||
# parallelism: 1
|
||||
# delay: 10s
|
||||
# order: start-first
|
||||
# restart_policy:
|
||||
# condition: any
|
||||
# delay: 5s
|
||||
# max_attempts: 3
|
||||
# window: 120s
|
||||
# mode: replicated
|
||||
# replicas: 1
|
||||
# ports:
|
||||
# - "27012:27017"
|
||||
# networks:
|
||||
# - mother
|
||||
|
||||
|
||||
|
||||
mongoarbiter:
|
||||
image: registry.vnfco.ir/library/bitnami/mongodb:4.4.11-debian-10-r5
|
||||
environment:
|
||||
- MONGODB_REPLICA_SET_MODE=arbiter
|
||||
- MONGODB_REPLICA_SET_NAME=igrep
|
||||
- MONGODB_ADVERTISED_HOSTNAME=mongoarbiter
|
||||
- MONGODB_INITIAL_PRIMARY_HOST=mongoprimary
|
||||
- MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017
|
||||
- MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=cWv1WQvWEp+LPdax9We/M6PeT7KgyTE9zKmC5y1ieqz4JtpLiVifJrQg0VHYhE6l
|
||||
- MONGODB_REPLICA_SET_KEY=keyissetforlocalreplica
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
order: start-first
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
max_attempts: 3
|
||||
window: 120s
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
networks:
|
||||
- mother
|
||||
# mongoarbiter:
|
||||
# image: registry.vnfco.ir/library/bitnami/mongodb:4.4.11-debian-10-r5
|
||||
# environment:
|
||||
# - MONGODB_REPLICA_SET_MODE=arbiter
|
||||
# - MONGODB_REPLICA_SET_NAME=igrep
|
||||
# - MONGODB_ADVERTISED_HOSTNAME=mongoarbiter
|
||||
# - MONGODB_INITIAL_PRIMARY_HOST=mongoprimary
|
||||
# - MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017
|
||||
# - MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=cWv1WQvWEp+LPdax9We/M6PeT7KgyTE9zKmC5y1ieqz4JtpLiVifJrQg0VHYhE6l
|
||||
# - MONGODB_REPLICA_SET_KEY=keyissetforlocalreplica
|
||||
# deploy:
|
||||
# update_config:
|
||||
# parallelism: 1
|
||||
# delay: 10s
|
||||
# order: start-first
|
||||
# restart_policy:
|
||||
# condition: any
|
||||
# delay: 5s
|
||||
# max_attempts: 3
|
||||
# window: 120s
|
||||
# mode: replicated
|
||||
# replicas: 1
|
||||
# networks:
|
||||
# - mother
|
||||
|
||||
|
||||
|
||||
|
|
Binary file not shown.
|
@ -79,20 +79,23 @@ services:
|
|||
- node.role == worker
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /volume/ig/api/storage
|
||||
source: /volume/ig
|
||||
target: /target/storage
|
||||
- type: bind
|
||||
source: /data/backup
|
||||
target: /target/backup
|
||||
- type: bind
|
||||
source: /volume/config/core/application-prod.properties
|
||||
target: /target/classes/application-prod.properties
|
||||
- type: bind
|
||||
source: /volume/ig/api/logs/http.log
|
||||
targer: /target/logs/http.log
|
||||
target: /target/logs/http.log
|
||||
- type: bind
|
||||
source: /volume/ig/api/logs/error.log
|
||||
targer: /target/logs/error.log
|
||||
target: /target/logs/error.log
|
||||
- type: bind
|
||||
source: /volume/ig/api/logs/archive
|
||||
targer: /target/logs/archive
|
||||
target: /target/logs/archive
|
||||
- type: bind
|
||||
source: /etc/localtime
|
||||
target: /etc/localtime
|
||||
|
@ -112,13 +115,14 @@ services:
|
|||
image: registry.vnfco.ir/ig/sms:latest
|
||||
environment:
|
||||
- QUEUE_NAME=ig-sms
|
||||
- RABBIT_URI=amqp://test:test@192.168.0.108:5672
|
||||
- RABBIT_URI=amqp://igarsonAgent:muyXHzymcTYLzk3wYnIwG+UJWECKy0ViUDO+UlCmPF3XS+2kliuV0TaA0mWf6lT@rabbitmq:5672
|
||||
- SMS_SERVICE_URI=https://api.kavenegar.com/v1/
|
||||
- USERAPIKEY=3735494B4143727A794346457461576A2B4B6668414973424E333561505A694B
|
||||
- SECRETKEY=!#u*(!@ofOAJDU31y+
|
||||
- LINENUMBER=2000500666
|
||||
- VERIFICATION_SERVICE_CONTEXT_PATH=/verify/lookup.json
|
||||
- SMS_SERVICE_CONTEXT_PATH=/sms/lookup.json
|
||||
|
||||
- TZ=Asia/Tehran
|
||||
deploy:
|
||||
update_config:
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
|
||||
version: "3.7"
|
||||
|
||||
networks:
|
||||
mother:
|
||||
external: true
|
||||
|
||||
|
||||
# ig games stack
|
||||
|
||||
services:
|
||||
|
||||
twentyfortyeight:
|
||||
image: registry.vnfco.ir/ig/game/2048:latest
|
||||
environment:
|
||||
- TZ=Asia/Tehran
|
||||
# - NODE_ENV=production
|
||||
# - REACT_APP_SIGNAL_URL=https://ls.igarson.app
|
||||
# - REACT_APP_PATH_URL=/api/v1
|
||||
# - REACT_APP_STORAGE_URL=https://storage.igarson.app
|
||||
# - REACT_APP_SIGNAL_URL_PATH=/restauranthub
|
||||
# - REACT_APP_LOG_LENGTH=20
|
||||
# - REACT_APP_SOCKET_SECRET=GodProtectedKeyTools
|
||||
# - REACT_APP_SECRET_KEY_GAME=6JCvBmi1ADry5Qk0bLaV+5klnAqYaVtjn+HSHG4N4pOAEl480saobylNWcudDxhvgw6q0yzVmbYH+lQIS3RmEHLXRHYAHxsdXl5MBuqU/p1oCC3SWmYke1SWHkoTUOm1f8SBZ1HucOxBHv7psqFUu5lG38P/EPiozv6/0qDU+vVFFp6v9ZTigBihLll0mU6qR14krot8+y9tOnrLDkHxw3wLvWsB4wgd9+RAY97Gzzs7ix3nAXthsT+jPWdyuENiKSuKEyHKbDqciJRBGqktgYU9XkYIfZzEm4cxhscT9jqNsUg2ml+uJdDQOps2mL5LgNetWWmcP43xPIkxAwu5oK873GV3uZOdQqYE2CBYT66+/+Yp5xzoL4+qZUUiDEpfWKm+clRlAm1Keiur
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
order: start-first
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
window: 120s
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 50M
|
||||
replicas: 1
|
||||
mode: replicated
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
ports:
|
||||
- 6001:80
|
||||
volumes:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
networks:
|
||||
- mother
|
||||
|
||||
|
||||
|
||||
sudoku:
|
||||
image: registry.vnfco.ir/ig/game/sudoku:latest
|
||||
environment:
|
||||
- TZ=Asia/Tehran
|
||||
# - NODE_ENV=production
|
||||
# - REACT_APP_SIGNAL_URL=https://ls.igarson.app
|
||||
# - REACT_APP_PATH_URL=/api/v1
|
||||
# - REACT_APP_STORAGE_URL=https://storage.igarson.app
|
||||
# - REACT_APP_SIGNAL_URL_PATH=/restauranthub
|
||||
# - REACT_APP_LOG_LENGTH=20
|
||||
# - REACT_APP_SOCKET_SECRET=GodProtectedKeyTools
|
||||
# - REACT_APP_SECRET_KEY_GAME=6JCvBmi1ADry5Qk0bLaV+5klnAqYaVtjn+HSHG4N4pOAEl480saobylNWcudDxhvgw6q0yzVmbYH+lQIS3RmEHLXRHYAHxsdXl5MBuqU/p1oCC3SWmYke1SWHkoTUOm1f8SBZ1HucOxBHv7psqFUu5lG38P/EPiozv6/0qDU+vVFFp6v9ZTigBihLll0mU6qR14krot8+y9tOnrLDkHxw3wLvWsB4wgd9+RAY97Gzzs7ix3nAXthsT+jPWdyuENiKSuKEyHKbDqciJRBGqktgYU9XkYIfZzEm4cxhscT9jqNsUg2ml+uJdDQOps2mL5LgNetWWmcP43xPIkxAwu5oK873GV3uZOdQqYE2CBYT66+/+Yp5xzoL4+qZUUiDEpfWKm+clRlAm1Keiur
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
order: start-first
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
window: 120s
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 50M
|
||||
replicas: 1
|
||||
mode: replicated
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
ports:
|
||||
- 6002:80
|
||||
volumes:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
networks:
|
||||
- mother
|
||||
|
||||
|
||||
tetris:
|
||||
image: registry.vnfco.ir/ig/game/tetris:latest
|
||||
environment:
|
||||
- TZ=Asia/Tehran
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
order: start-first
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
window: 120s
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 50M
|
||||
replicas: 1
|
||||
mode: replicated
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
ports:
|
||||
- 6005:80
|
||||
volumes:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
networks:
|
||||
- mother
|
||||
|
||||
doz:
|
||||
image: registry.vnfco.ir/ig/game/doz:latest
|
||||
environment:
|
||||
- TZ=Asia/Tehran
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
order: start-first
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
window: 120s
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 20M
|
||||
replicas: 1
|
||||
mode: replicated
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
ports:
|
||||
- 6006:80
|
||||
volumes:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
networks:
|
||||
- mother
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
version: "3.7"
|
||||
|
||||
networks:
|
||||
mother:
|
||||
external: true
|
||||
|
||||
|
||||
services:
|
||||
|
||||
watcher:
|
||||
image: registry.vnfco.ir/ig/watcher:latest
|
||||
environment:
|
||||
deploy:
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
order: start-first
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
window: 120s
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.1'
|
||||
memory: 10M
|
||||
replicas: 1
|
||||
mode: replicated
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
volumes:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
- "/volume/watcher/service_list:/usr/app/src/service_list:ro"
|
||||
networks:
|
||||
- mother
|
Loading…
Reference in New Issue