-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (83 loc) · 2.11 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3.8'
services:
# Laravel with PHP 8.4
app:
build:
context: .
dockerfile: docker/Dockerfile
container_name: sellers_service_app
restart: unless-stopped
working_dir: /var/www
volumes:
- .:/var/www
depends_on:
- mysql
- redis
networks:
- laravel
# Nginx for Laravel
nginx:
image: nginx:latest
container_name: sellers_service_nginx
restart: unless-stopped
ports:
- "8082:80"
volumes:
- .:/var/www
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
networks:
- laravel
# MySQL 8
mysql:
image: mysql:8
container_name: sellers_service_mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: laravel_user
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- laravel
# Redis for caching & queues
redis:
image: redis:latest
container_name: sellers_service_redis
restart: unless-stopped
ports:
- "6379:6379"
networks:
- laravel
# MailHog for email testing
mailhog:
image: mailhog/mailhog
container_name: sellers_service_mailhog
restart: unless-stopped
ports:
- "8025:8025" # Web UI
- "1025:1025" # SMTP Server
networks:
- laravel
swagger-ui:
image: swaggerapi/swagger-ui
container_name: sellers_service_swagger_ui
restart: unless-stopped
ports:
- "8083:8080" # Exposes Swagger UI on localhost:8081
depends_on:
- nginx
environment:
SWAGGER_JSON_URL: "${SWAGGER_JSON_URL}"
networks:
- laravel
networks:
laravel:
driver: bridge
volumes:
mysql_data: