main: 初始化项目基础结构
- 添加项目必要的配置文件(例如 `.env.example`、`.gitignore` 等) - 配置 Docker 环境相关文件(如 `.dockerignore`) - 引入默认的 `composer.json` 依赖项和脚本配置 - 添加基础数据库迁移文件 - 配置 Laravel 默认的资源文件夹和初始内容
This commit is contained in:
53
docker-compose.yml
Normal file
53
docker-compose.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/app/Dockerfile
|
||||
entrypoint: ["/app/docker/app/entrypoint.sh"]
|
||||
volumes:
|
||||
- ./:/app
|
||||
environment:
|
||||
APP_ENV: local
|
||||
APP_DEBUG: "true"
|
||||
APP_URL: http://localhost:8000
|
||||
OCTANE_SERVER: frankenphp
|
||||
DB_CONNECTION: pgsql
|
||||
DB_HOST: pgsql
|
||||
DB_PORT: 5432
|
||||
DB_DATABASE: ars_backend
|
||||
DB_USERNAME: ars
|
||||
DB_PASSWORD: secret
|
||||
REDIS_HOST: redis
|
||||
REDIS_PASSWORD: "null"
|
||||
REDIS_PORT: 6379
|
||||
ports:
|
||||
- "8000:8000"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
depends_on:
|
||||
- pgsql
|
||||
- redis
|
||||
tty: true
|
||||
|
||||
pgsql:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: ars_backend
|
||||
POSTGRES_USER: ars
|
||||
POSTGRES_PASSWORD: secret
|
||||
volumes:
|
||||
- pgsql_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
volumes:
|
||||
pgsql_data:
|
||||
redis_data:
|
||||
Reference in New Issue
Block a user