51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
services:
|
|
realcity-app:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/app/Dockerfile
|
|
container_name: realcity-app
|
|
env_file:
|
|
- docker/env/.env.docker # Copia local, no versionada
|
|
ports:
|
|
- "9000:9000" # Por ejemplo, PHP-FPM (o podrías usar 8000)
|
|
volumes:
|
|
- ./:/var/www # Monta todo tu código Laravel (incluyendo vendor si corre composer dentro del contenedor)
|
|
- ./docker/app/opcache.ini:/usr/local/etc/php/conf.d/opcache.ini
|
|
- ./docker/app/nginx.conf:/etc/nginx/nginx.conf # Si Nginx está en el mismo contenedor
|
|
depends_on:
|
|
- mariadb
|
|
- redis
|
|
|
|
mariadb:
|
|
image: mariadb:10.8
|
|
container_name: realcity-mariadb
|
|
env_file:
|
|
- docker/env/.env.docker # Variables DB_HOST, DB_USER, DB_PASS, etc.
|
|
ports:
|
|
- "3306:3306"
|
|
volumes:
|
|
- realcity-mariadb-data:/var/lib/mysql
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: realcity-redis
|
|
ports:
|
|
- "6379:6379"
|
|
|
|
nginx:
|
|
image: nginx:1.23-alpine
|
|
container_name: realcity-nginx
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./:/var/www
|
|
- ./docker/app/nginx.conf:/etc/nginx/nginx.conf
|
|
#- ./docker/app/ssl:/etc/nginx/ssl # Si usas certificados para HTTPS
|
|
depends_on:
|
|
- realcity-app
|
|
|
|
volumes:
|
|
realcity-mariadb-data:
|
|
|