2024-02-15 03:02:13 +05:30
|
|
|
version: '3.8'
|
|
|
|
|
2024-02-22 00:43:50 +05:30
|
|
|
volumes:
|
2024-02-22 01:45:41 +05:30
|
|
|
data:
|
2024-02-22 00:43:50 +05:30
|
|
|
|
2024-02-15 03:02:13 +05:30
|
|
|
services:
|
2024-02-22 03:40:45 +05:30
|
|
|
database:
|
2024-02-22 00:43:50 +05:30
|
|
|
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
|
|
|
|
|
2024-02-22 00:43:50 +05:30
|
|
|
# Build from local Dockerfile.Comment/Uncomment Below
|
|
|
|
# build:
|
|
|
|
# context: .
|
|
|
|
# dockerfile: Dockerfile
|
2024-02-15 16:50:39 +05:30
|
|
|
|
|
|
|
healthcheck:
|
2024-02-22 01:45:41 +05:30
|
|
|
test: [ "CMD-SHELL", "curl", "-f", "http://localhost:8080/monitoring" ]
|
2024-02-15 16:50:39 +05:30
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2024-02-22 00:43:50 +05:30
|
|
|
start_period: 30s
|
2024-02-15 16:50:39 +05:30
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-02-22 00:43:50 +05:30
|
|
|
ports:
|
|
|
|
- "8080:8080"
|
|
|
|
depends_on:
|
2024-02-22 03:40:45 +05:30
|
|
|
- database
|
2024-02-15 16:50:39 +05:30
|
|
|
|