video-sub/.devcontainer/service/devcontainer.json

45 lines
2.1 KiB
JSON
Raw Normal View History

2024-02-07 18:58:36 +01:00
{
"name": "larapod",
"image": "php:8.1-fpm",
"extensions": [
"felixfbecker.php-debug",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
],
"settings": {
"php.validate.enable": true,
"php.suggest.basic": false,
"php.executablePath": "/usr/local/bin/php"
},
"mounts": [
2024-02-07 19:04:27 +01:00
"source=/git,target=/workspace,type=bind,consistency=delegated"
2024-02-07 18:58:36 +01:00
],
"postCreateCommand": "apt-get update && apt-get install -y build-essential default-mysql-client libpng-dev libjpeg62-turbo-dev libfreetype6-dev libzip-dev locales zip jpegoptim optipng pngquant gifsicle git unzip && cd /workspace && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && apt-get install -y libpq-dev && docker-php-ext-install pdo_pgsql && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash && export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" && [ -s \"$NVM_DIR/bash_completion\" ] && \\. \"$NVM_DIR/bash_completion\" && nvm install lts/hydrogen && npm install -g pnpm && npm install -g @nestjs/cli",
"remoteEnv": {
"COMPOSER_ALLOW_SUPERUSER": "1"
},
"services": {
"db": {
"image": "mysql:latest",
"ports": ["3306:3306"],
"environment": {
"MYSQL_DATABASE": "laravel",
"MYSQL_USER": "laravel",
"MYSQL_PASSWORD": "password",
"MYSQL_ROOT_PASSWORD": "password"
},
"command": "mysqld --general-log=1 --general-log-file=/var/lib/mysql/general.log",
"volumes": ["mysql_data:/var/lib/mysql"]
},
"redis": {
"image": "redis:latest",
"ports": ["6379:6379"],
"volumes": ["redis_data:/data"]
}
},
"forwardPorts": [3306, "db:3306", 8000, "redis:6379"],
"remoteExtensions": ["ms-vscode-remote.vscode-remote-extensionpack"],
"volumes": ["mysql_data:/var/lib/mysql", "redis_data:/data"]
}