URLShortener/docker-compose.yml

44 lines
893 B
YAML
Raw Normal View History

2024-02-15 03:02:13 +05:30
version: '3.8'
volumes:
data:
2024-02-15 03:02:13 +05:30
services:
database:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: 1234qwer
MYSQL_DATABASE: shortener
MYSQL_USER: shortener_user
MYSQL_PASSWORD: 1234qwer
volumes:
- data:/var/lib/mysql
- ./create.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "3306:3306"
app:
2024-02-15 16:50:39 +05:30
labels:
- "TUSC The URL Shortener Company"
#Build from docker hub image .Comment/Uncomment Below
image: nmpl/shortener:latest
# Build from local Dockerfile.Comment/Uncomment Below
# build:
# context: .
# dockerfile: Dockerfile
2024-02-15 16:50:39 +05:30
healthcheck:
test: [ "CMD-SHELL", "curl", "-f", "http://localhost:8080/monitoring" ]
2024-02-15 16:50:39 +05:30
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
2024-02-15 16:50:39 +05:30
restart: unless-stopped
ports:
- "8080:8080"
depends_on:
- database
2024-02-15 16:50:39 +05:30