12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- version: "3.7"
-
- services:
- nginx:
- build:
- context: './etc/docker/nginx'
- ports:
- - "8080:80"
- networks:
- - internal
- volumes:
- - ./html:/var/www/html
-
- php:
- build:
- context: ./ # Contexto es la raíz del proyecto
- dockerfile: ./etc/docker/php/Dockerfile # Ruta relativa del Dockerfile
- container_name: 'liciagbar_web'
- networks:
- - internal
- links:
- - db_liciagbar_alpine
- volumes:
- - ./html:/var/www/html
- extra_hosts:
- - "host.docker.internal:host-gateway"
-
- db_liciagbar_alpine:
- build:
- context: './etc/docker/mysql'
- command: '--sql_mode=""'
- volumes:
- # Copiamos el script SQL al directorio de inicialización de MySQL
- - ./etc/docker/mysql/tablas/config_fecha_importaciones.sql:/docker-entrypoint-initdb.d/config_fecha_importaciones.sql
- - ./etc/docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- # Directorio de datos de MySQL
- - ./mysql/data:/var/lib/mysql
- environment:
- - MYSQL_DATABASE=liciagbar
- - MYSQL_ROOT_PASSWORD=liciagbar
- ports:
- - "3306:3306"
- networks:
- - internal
-
- networks:
- internal:
- driver: bridge
|