91 lines
1.9 KiB
YAML
91 lines
1.9 KiB
YAML
services:
|
|
# PHP & Nginx Application
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: luckywheel_app
|
|
restart: unless-stopped
|
|
working_dir: /var/www
|
|
volumes:
|
|
- ./:/var/www
|
|
- ./docker/nginx/default.conf:/etc/nginx/sites-available/default
|
|
- ./docker/supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
|
ports:
|
|
- "8080:80"
|
|
networks:
|
|
- luckywheel
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
environment:
|
|
- APP_ENV=local
|
|
- APP_DEBUG=true
|
|
- DB_HOST=db
|
|
- DB_PORT=3306
|
|
- DB_DATABASE=luckywheel
|
|
- DB_USERNAME=laravel
|
|
- DB_PASSWORD=laravel123
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
|
|
# MySQL Database
|
|
db:
|
|
image: mysql:8.0
|
|
container_name: luckywheel_db
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_DATABASE: luckywheel
|
|
MYSQL_USER: laravel
|
|
MYSQL_PASSWORD: laravel123
|
|
MYSQL_ROOT_PASSWORD: root123
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: 0
|
|
volumes:
|
|
- dbdata:/var/lib/mysql
|
|
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
|
|
ports:
|
|
- "3307:3306"
|
|
networks:
|
|
- luckywheel
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
|
|
# Redis
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: luckywheel_redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6380:6379"
|
|
networks:
|
|
- luckywheel
|
|
volumes:
|
|
- redisdata:/data
|
|
|
|
# PHPMyAdmin (Optional - for database management)
|
|
phpmyadmin:
|
|
image: phpmyadmin/phpmyadmin
|
|
container_name: luckywheel_phpmyadmin
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8081:80"
|
|
environment:
|
|
PMA_HOST: db
|
|
PMA_PORT: 3306
|
|
PMA_USER: laravel
|
|
PMA_PASSWORD: laravel123
|
|
UPLOAD_LIMIT: 100M
|
|
networks:
|
|
- luckywheel
|
|
depends_on:
|
|
- db
|
|
|
|
networks:
|
|
luckywheel:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
dbdata:
|
|
driver: local
|
|
redisdata:
|
|
driver: local
|