Skip to content

Instantly share code, notes, and snippets.

@elvinlari
Last active September 23, 2022 03:50
Show Gist options
  • Select an option

  • Save elvinlari/d7801e1fc054adbddbea8eb7512205d8 to your computer and use it in GitHub Desktop.

Select an option

Save elvinlari/d7801e1fc054adbddbea8eb7512205d8 to your computer and use it in GitHub Desktop.
Migration and seeder service
laravel-migrate-seed:
build:
context: ./docker
dockerfile: php.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- USER=${USER:-laravel}
container_name: laravel-migrate-seed
volumes:
- ./src:/var/www/html
- .env:/var/www/html/.env
depends_on:
- mysql
profiles: ["migrate-seed"]
working_dir: /var/www/html
entrypoint: ["/bin/sh","-c"]
command:
- |
php artisan migrate
php artisan db:seed
networks:
- laravel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment