Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/khouloudhaddad/sf6-dockerized

Dockerize symfony App environment for developmement
https://github.com/khouloudhaddad/sf6-dockerized

docker php symfony

Last synced: 4 days ago
JSON representation

Dockerize symfony App environment for developmement

Awesome Lists containing this project

README

        

# Symfony 6 + PHP 8.0.13 with Docker

**ONLY for DEV, not for production**

A very simple Docker-compose to discover Symfony 6 with PHP 8.0.13 in 5 minutes
## Run Locally

Clone the project

```bash
[email protected]:khouloudhaddad/sf6-dockerized.git
```

Run the docker-compose

```bash
docker-compose build
docker-compose up -d
```

Log into the PHP container

```bash
docker exec -it php8-sf6 bash
```

Create your Symfony application and launch the internal server

```bash
symfony new new-project --full
cd new-project
symfony serve -d
```

Create an account (identical to your local session)

```bash
adduser username
chown username:username -R .
```

*Your application is available at http://127.0.0.1:9000*

If you need a database, modify the .env file like this example:

```yaml
DATABASE_URL="postgresql://symfony:ChangeMe@database:5432/app?serverVersion=13&charset=utf8"
```

## Ready to use with

This docker-compose provides you :

- PHP-8.0.13-cli (Debian)
- Composer
- Symfony CLI
- and some other php extentions
- nodejs, npm, yarn
- postgres:13-alpine
- mailcatcher

## Requirements

Out of the box, this docker-compose is designed for a Linux operating system, provide adaptations for a Mac or Windows environment.

- Linux (Ubuntu 20.04 or other)
- Docker
- Docker-compose