Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

Dockerizing a laravel application.

Useful notes:
  • Clone the repo into your root of your project.
  • Make sure file and folder ownership is set to a user with id and gid of 1000, and if didn't exist create one.
  • Make sure docker/entrypoint.sh has 755 permission.
  • Make sure .env file exists with DOCKER_APP_CONTAINER_NAME, DOCKER_APP_PORT and DOCKER_DB_CONTAINER_NAME keys defined as they define the container names, for example first one could be app and database could be app_database.
  • Don't forget to manually run composer install / update just in case the default one fails.
  • Shell into the docker to run necessary commands such as php artisan migrate;
  • Command for rebuilding container after changes or pulls, sudo docker compose build --no-cache && sudo docker compose up --force-recreate -d.
  • Importing data from sql dump in to database container, sudo docker exec -i container_name mysql -uuser -ppassword database_name < file.sql.
  • Remove ports section from docker compose file if you are running your webserver in a container as this helps to prevent ip:port access to your docker containers.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages