Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2.1'
- services:
- web:
- image: sileax/docker-front-devops-estiam:prod
- ports:
- - "32111:80"
- depends_on:
- nodeapi:
- condition: service_healthy
- nodeapi:
- image: sileax/api-devops:prod
- ports:
- - "31213:31213"
- environment:
- - NODE_ENV=production_postgres
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:31213/users"]
- interval: 30s
- timeout: 10s
- retries: 3
- depends_on:
- mysql:
- condition: service_healthy
- postgres:
- condition: service_healthy
- mysql:
- image: mysql:5.7.22
- ports:
- - "3306:3306"
- environment:
- - MYSQL_ROOT_PASSWORD=myrootpassword
- - MYSQL_DATABASE=database_production
- - MYSQL_USER=quasar
- - MYSQL_PASSWORD=quasar
- healthcheck:
- test: mysql -uquasar -pquasar database_production -e "SELECT 1"
- timeout: 40s
- retries: 10
- volumes:
- - ./mysql-volume:/var/lib/mysql
- postgres:
- image: postgres:10.4-alpine
- ports:
- - "5432:5432"
- environment:
- - POSTGRES_PASSWORD=myrootpassword
- - POSTGRES_DB=database_production
- - POSTGRES_USER=root
- healthcheck:
- test: PGPASSWORD=myrootpassword psql -U root -d database_production -c "SELECT 1"
- timeout: 40s
- retries: 10
- volumes:
- - postgre-volume:/var/lib/postgresql/data
- volumes:
- mysql-volume:
- postgre-volume:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement