Free and open source project developed during my intership at Cloud Temple. It was done with php 8, symfony 6, postgreSQL and docker. Please, feel free to clone it and play with it as you wish!
Install docker and docker-compose:
sudo apt install docker -y && sudo apt install docker -y
Add user to docker group (if not already added):
sudo usermod -aG docker $USER
Grant docker sock permission:
sudo chmod 666 /var/run/docker.sock
Create a symbolic link to /usr/bin:
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Restart docker service:
sudo service docker restart
Clone the project:
git clone https://github.com/enzodjabali/symfo-ct-project
Create and start containers:
cd symfo-ct-project/ && docker-compose up
Create a copy of the .env
file then name it .env.local
and fill it out
Connect to php container:
docker exec -it php sh
Install dependencies with composer:
composer install
Update var/ directory:
chmod -R 777 var/
Create database:
bin/console d:d:c
Migrate database:
bin/console d:m:m
Congrats! You can now access your app server at localhost:8080
🎉
Grant permissions to www-data (might solve cache errors from liip/imagine-bundle):
sudo chown -R $USER:www-data symfo-ct-project/ && sudo chmod -R g+r+x+w symfo-ct-project/
Load fixtures with faker (in php container):
bin/console d:f:l
Access PostgreSQL container:
docker exec -it symfo-ct-project_database_1 sh
Connect to database:
psql -U symfony -d app
List users:
SELECT * FROM public.user;
Set user verified:
UPDATE public.user SET verified = true WHERE id = 1;
Set user super admin:
UPDATE public.user SET roles = '["ROLE_SUPER_ADMIN"]' WHERE id = 1;
Thanks and enjoy 👋