@shahanahmed86/create-server
Version:
A CLI to bootstrap a server
47 lines (42 loc) • 944 B
YAML
version: '3.7'
services:
web:
image: nginx:1.21.6-alpine
ports:
- '80:80'
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/default.html:/usr/share/nginx/html/index.html
depends_on:
- server
networks:
- my_project
server:
depends_on:
- mysqldb
- cache
networks:
- my_project
mysqldb:
image: mysql:8.0.28-oracle
command: --authentication_policy=mysql_native_password
volumes:
- ./healthchecks:/healthchecks
healthcheck:
test: /healthchecks/mysql-healthcheck.sh
interval: 11s
timeout: 5s
retries: 5
environment:
MYSQL_ROOT_PASSWORD: $DB_PASS
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASS
cap_add:
- SYS_NICE # CAP_SYS_NICE
networks:
- my_project
cache:
image: redis:7.0.0-alpine
networks:
- my_project