add docker
This commit is contained in:
84
docker-compose.local.yml
Normal file
84
docker-compose.local.yml
Normal file
@@ -0,0 +1,84 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: local
|
||||
container_name: sibedas_app_local
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
APP_ENV: local
|
||||
APP_DEBUG: true
|
||||
APP_URL: http://localhost:8000
|
||||
VITE_APP_URL: http://localhost:8000
|
||||
DB_CONNECTION: mariadb
|
||||
DB_HOST: db
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: sibedas
|
||||
DB_USERNAME: root
|
||||
DB_PASSWORD: root
|
||||
volumes:
|
||||
- .:/var/www
|
||||
# Exclude node_modules to prevent conflicts
|
||||
- /var/www/node_modules
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- sibedas_net
|
||||
# Add user mapping for permission compatibility
|
||||
user: "1000:1000"
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: sibedas_nginx_local
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- .:/var/www
|
||||
- ./docker/nginx/conf.d/app.conf:/etc/nginx/conf.d/default.conf
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
- sibedas_net
|
||||
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
container_name: sibedas_db_local
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: sibedas
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: root
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- dbdata_local:/var/lib/mysql
|
||||
- ./sibedas.sql:/docker-entrypoint-initdb.d/sibedas.sql
|
||||
networks:
|
||||
- sibedas_net
|
||||
|
||||
vite:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: development
|
||||
container_name: sibedas_vite_local
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
VITE_APP_URL: http://localhost:8000
|
||||
volumes:
|
||||
- .:/var/www
|
||||
- /var/www/node_modules
|
||||
ports:
|
||||
- "5173:5173"
|
||||
networks:
|
||||
- sibedas_net
|
||||
|
||||
volumes:
|
||||
dbdata_local:
|
||||
|
||||
networks:
|
||||
sibedas_net:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user