Closed thedarkknight197 closed 3 years ago
The docker-composer.yml file is part of the skeleton. See here: https://github.com/odan/slim4-skeleton/blob/master/docker-compose.yml
Cloning your repo
Trying adding docker-compose.yml and Dockerfile from your repo to my project that i have created before i have this error:
I have update my env file with
$settings['db']['database'] = 'test'; $settings['db']['username'] = 'root'; $settings['db']['password'] = 'root'; $settings['db']['host'] = 'testslim_db_1';
Now i Recive:
autoloader.php is missing
This means the composer autoloader is missing. Just run composer update
to create the vendor directory.
Notice: Undefined index index column_name in DataTableRepository.php line 220
This PHP notice is not related to the docker container.
It looks like the column_name
is not defined.
Please try to clone the latest version of the repo.
Mh I think that I miss to import the db. I have to do migration or you have an import mysql-dump?
I use Laravel, to do migration I need to run:
php artisan migrate
Exist for Slim a similar running command? I only create my db without table. but it call the db: test, I don't know if is this the problem. Now I am at Home, tomorrow at work I see the project
Slim is a micro-framework and provides only routing and dispatching functionality.
This skeleton provides a phinx to migrate the table structure, e.g. composer migrations:migrate
On your docker launched at /var/www/html
`composer migrations:migrate
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "migrations" namespace.
`
if i move in resources:
`cd resources
docker locale migrations seeds
No composer.json in current directory, do you want to use the one at /var/www/html? [Y,n]? y
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "migrations" namespace.
`
All commands must be started from the project-root directory. Composer is usually only installed on the development machine but not on the production server.
For development (only)
composer migrations:migrate
For production:
If Composer is not installed on the target server, the following command can be used: $ vendor/bin/phinx migrate -c config/phinx.php
Please read the documentation of this skeleton-project first.
https://odan.github.io/slim4-skeleton/database.html#update-schema
Hi i am following your wiki on: https://odan.github.io/slim4-skeleton/setup/docker.html but after i have created my application with:
composer create-project odan/slim4-skeleton my-app
the file docker-compose.yml will not create, and i can't run my docker container.
Anyone can help me?
Thank you