|
| 1 | +name: ${PROJECT_NAME:-project_skeleton} |
| 2 | + |
| 3 | +services: |
| 4 | + gateway: |
| 5 | + build: |
| 6 | + context: .. |
| 7 | + dockerfile: .docker/nginx/Dockerfile |
| 8 | + depends_on: |
| 9 | + php: |
| 10 | + condition: service_started |
| 11 | + required: false |
| 12 | + node: |
| 13 | + condition: service_started |
| 14 | + required: false |
| 15 | + environment: |
| 16 | + APP_PRESET: ${APP_PRESET:-none} |
| 17 | + ports: |
| 18 | + - "127.0.0.1:${PORT_HTTP}:80" |
| 19 | + volumes: |
| 20 | + - ../apps:/workspace/apps:ro |
| 21 | + |
| 22 | + php: |
| 23 | + profiles: ["laravel", "legacy"] |
| 24 | + build: |
| 25 | + context: .. |
| 26 | + dockerfile: .docker/php/Dockerfile |
| 27 | + depends_on: |
| 28 | + mysql: |
| 29 | + condition: service_healthy |
| 30 | + redis: |
| 31 | + condition: service_healthy |
| 32 | + working_dir: /workspace/apps |
| 33 | + environment: |
| 34 | + APP_ENV: ${APP_ENV:-local} |
| 35 | + APP_DEBUG: ${APP_DEBUG:-true} |
| 36 | + APP_KEY: ${APP_KEY:-} |
| 37 | + APP_PRESET: ${APP_PRESET:-none} |
| 38 | + DB_CONNECTION: ${DB_CONNECTION:-mysql} |
| 39 | + DB_HOST: ${DB_HOST:-mysql} |
| 40 | + DB_PORT: ${DB_PORT:-3306} |
| 41 | + DB_DATABASE: ${DB_DATABASE:-app} |
| 42 | + DB_USERNAME: ${DB_USERNAME:-app} |
| 43 | + DB_PASSWORD: ${DB_PASSWORD:-app} |
| 44 | + REDIS_HOST: ${REDIS_HOST:-redis} |
| 45 | + REDIS_PORT: ${REDIS_PORT:-6379} |
| 46 | + MAIL_HOST: ${MAIL_HOST:-mailpit} |
| 47 | + MAIL_PORT: ${MAIL_PORT:-1025} |
| 48 | + volumes: |
| 49 | + - ../apps:/workspace/apps |
| 50 | + - composer-cache:/tmp/composer-cache |
| 51 | + |
| 52 | + node: |
| 53 | + profiles: ["next", "legacy"] |
| 54 | + build: |
| 55 | + context: .. |
| 56 | + dockerfile: .docker/node/Dockerfile |
| 57 | + working_dir: /workspace/apps |
| 58 | + command: ["sh", "/usr/local/bin/start-node-preset"] |
| 59 | + environment: |
| 60 | + APP_PRESET: ${APP_PRESET:-none} |
| 61 | + NODE_ENV: ${NODE_ENV:-development} |
| 62 | + VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost} |
| 63 | + volumes: |
| 64 | + - ../apps:/workspace/apps |
| 65 | + - node-cache:/workspace/.cache |
| 66 | + |
| 67 | + tools: |
| 68 | + build: |
| 69 | + context: .. |
| 70 | + dockerfile: .docker/tools/Dockerfile |
| 71 | + user: "${TOOLS_UID:-1000}:${TOOLS_GID:-1000}" |
| 72 | + working_dir: /workspace |
| 73 | + volumes: |
| 74 | + - ../:/workspace |
| 75 | + |
| 76 | + queue: |
| 77 | + profiles: ["workers"] |
| 78 | + build: |
| 79 | + context: .. |
| 80 | + dockerfile: .docker/php/Dockerfile |
| 81 | + depends_on: |
| 82 | + mysql: |
| 83 | + condition: service_healthy |
| 84 | + redis: |
| 85 | + condition: service_healthy |
| 86 | + working_dir: /workspace/apps |
| 87 | + command: ["sh", "/usr/local/bin/start-queue-preset"] |
| 88 | + environment: |
| 89 | + APP_ENV: ${APP_ENV:-local} |
| 90 | + APP_PRESET: ${APP_PRESET:-none} |
| 91 | + DB_HOST: ${DB_HOST:-mysql} |
| 92 | + DB_PORT: ${DB_PORT:-3306} |
| 93 | + DB_DATABASE: ${DB_DATABASE:-app} |
| 94 | + DB_USERNAME: ${DB_USERNAME:-app} |
| 95 | + DB_PASSWORD: ${DB_PASSWORD:-app} |
| 96 | + REDIS_HOST: ${REDIS_HOST:-redis} |
| 97 | + REDIS_PORT: ${REDIS_PORT:-6379} |
| 98 | + volumes: |
| 99 | + - ../apps:/workspace/apps |
| 100 | + - composer-cache:/tmp/composer-cache |
| 101 | + |
| 102 | + mysql: |
| 103 | + image: mysql:9.7 |
| 104 | + environment: |
| 105 | + MYSQL_DATABASE: ${DB_DATABASE:-app} |
| 106 | + MYSQL_USER: ${DB_USERNAME:-app} |
| 107 | + MYSQL_PASSWORD: ${DB_PASSWORD:-app} |
| 108 | + MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-root} |
| 109 | + ports: |
| 110 | + - "127.0.0.1:${PORT_DB}:3306" |
| 111 | + volumes: |
| 112 | + - mysql-data:/var/lib/mysql |
| 113 | + healthcheck: |
| 114 | + test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-u", "root", "-p${DB_ROOT_PASSWORD:-root}"] |
| 115 | + interval: 5s |
| 116 | + timeout: 5s |
| 117 | + retries: 20 |
| 118 | + |
| 119 | + redis: |
| 120 | + image: redis:8.8-alpine |
| 121 | + ports: |
| 122 | + - "127.0.0.1:${PORT_REDIS}:6379" |
| 123 | + volumes: |
| 124 | + - redis-data:/data |
| 125 | + healthcheck: |
| 126 | + test: ["CMD", "redis-cli", "ping"] |
| 127 | + interval: 5s |
| 128 | + timeout: 3s |
| 129 | + retries: 10 |
| 130 | + |
| 131 | + mailpit: |
| 132 | + image: axllent/mailpit:v1.30 |
| 133 | + ports: |
| 134 | + - "127.0.0.1:${PORT_MAIL}:8025" |
| 135 | + |
| 136 | +volumes: |
| 137 | + composer-cache: |
| 138 | + node-cache: |
| 139 | + mysql-data: |
| 140 | + redis-data: |
0 commit comments