swarmpit
This commit is contained in:
119
.deploy-infra/deploy-prod.yaml
Normal file
119
.deploy-infra/deploy-prod.yaml
Normal file
@@ -0,0 +1,119 @@
|
||||
version: "3.6"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: mathwave/sprint-repo:sprint-infra-nginx-prod
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
networks:
|
||||
- battleship-nginx
|
||||
- sprint-nginx
|
||||
- swarmpit-nginx
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 2
|
||||
restart_policy:
|
||||
condition: any
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
volumes:
|
||||
- /sprint-data/postgres-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: $DB_PASSWORD_PROD
|
||||
ports:
|
||||
- "5432:5432"
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
condition: any
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:3.7.9-management
|
||||
ports:
|
||||
- "5672:5672"
|
||||
- "15672:15672"
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_PASS: $RABBITMQ_PASSWORD_PROD
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
condition: any
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
command: redis-server --requirepass $REDIS_PASSWORD_PROD
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
condition: any
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
gitlab-runner:
|
||||
image: mathwave/sprint-repo:gitlab-runner
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /sprint-data/gitlab:/etc/gitlab-runner
|
||||
environment:
|
||||
GITLAB_REGISTRATION_TOKEN: $GITLAB_REGISTRATION_TOKEN
|
||||
deploy:
|
||||
mode: replicated
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
restart_policy:
|
||||
condition: any
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
minio:
|
||||
image: bitnami/minio
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
environment:
|
||||
MINIO_ROOT_USER: minioadmin
|
||||
MINIO_ROOT_PASSWORD: $MINIO_PASSWORD_PROD
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
deploy:
|
||||
mode: replicated
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
restart_policy:
|
||||
condition: any
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
|
||||
volumes:
|
||||
minio_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
battleship-nginx:
|
||||
external: true
|
||||
sprint-nginx:
|
||||
external: true
|
||||
swarmpit-nginx:
|
||||
external: true
|
Reference in New Issue
Block a user