39 lines
1.4 KiB
JSON
39 lines
1.4 KiB
JSON
{
|
|
"image":"php:8.3-fpm",
|
|
"customizations": {},
|
|
"mounts": [
|
|
],
|
|
"remoteEnv": {
|
|
"COMPOSER_ALLOW_SUPERUSER": "1"
|
|
},
|
|
"postCreateCommand": "apt-get update && apt-get install -y build-essential postgresql-client libpng-dev libjpeg62-turbo-dev libfreetype6-dev libzip-dev locales zip jpegoptim optipng pngquant gifsicle git unzip && mkdir /workspace && 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\"",
|
|
"services": {
|
|
"db": {
|
|
"image": "postgres:14",
|
|
"ports": ["5432:5432"],
|
|
"environment": {
|
|
"MYSQL_DATABASE": "laravel",
|
|
"MYSQL_USER": "laravel",
|
|
"MYSQL_PASSWORD": "password",
|
|
"MYSQL_ROOT_PASSWORD": "password"
|
|
},
|
|
"volumes": ["postgres_data:/var/lib/postgresql/data"]
|
|
},
|
|
"redis": {
|
|
"image": "redis:latest",
|
|
"ports": ["6379:6379"],
|
|
"volumes": ["redis_data:/data"]
|
|
},
|
|
"forwardPorts": [
|
|
8000,
|
|
5432,
|
|
"db:5432",
|
|
"redis:6379"
|
|
],
|
|
"volumes": [
|
|
"postgres_data:/var/lib/postgresql/data",
|
|
"redis_data:/data"
|
|
]
|
|
}
|
|
}
|