Skip to content

jesusdomin/sf6-docker-template

Repository files navigation

Symfony 6 Docker Template

How start

  1. Start docker container
docker-compose up -d
  1. Install dependencies
docker exec apache-php bash -c 'composer install'
docker exec apache-php bash -c 'composer install --working-dir=tools/php-cs-fixer'
  1. Access to http://localhost:8080/

Docker Utils

# Access to container "apache-php"
docker-compose exec apache-php sh

# Execute command
docker exec apache-php bash -c 'bin/console cache:clear'

# Build a start container
docker-compose up -d --build apache-php

# Stop containers (but no remove)
docker-compose stop

# Stop containers and remove
docker-compose down

Prepare PHPStorm

Configure CLI Interpreter

For add a new one, from

Select: "From Docker, Vagrant, VM, Remote" Remote: "Docker Compose" Server: "Docker" Configuration file: ./docker-compose.yml Service: "webapp"

Configure CLI Interpreter

Configure Language Level and Path Mappings

Select your CLI Interpreter defined in the previous step

It is crucial to define the path mapping for the vendor folder:

Configure CLI Interpreter

Configure remote server (for debug sessions)

Servers Configuration

Configure CS Fixer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published