Category : docker-compose

I’m using Laravel 8.x with Sail using PHP 8.0, recently, I actually messed up my compose.json file resulting in issues with the vendor, trying to recreate the project from scratch, I deleted the vendor folder. Normally, docker-compose would build and create the /path/to/project/vendor/laravel/sail/runtimes/ directory with its appropriate content, but for some reason, I keep getting ..

Read more

I faced with problem when using nginx with traefik. My project works correctly standalone, with nginx image, but when I try to implemented traefik I faced with some trouble, my SERVER global var did not contains HTTPS key, regarding this laravel did not undertstand it and used for assetic and other stuff which used IlluminateRoutingUrlGenerator::formatScheme ..

Read more

My application was running smoothly until i installed laravel octane following the documentation and then localhost has refused to work. I have my installation running on the docker installation for windows. Below is my docker-compose.yml file # For more information: https://laravel.com/docs/sail version: ‘3’ services: laravel.test: build: context: ./docker/8.0 dockerfile: Dockerfile args: WWWGROUP: ‘${WWWGROUP}’ image: sail-8.0/app ..

Read more

I installed laravel 8 via sail. By default docker-compose.yml use mysql:8. But I need to change mysql version to 5.6 or 5.7. When I run "sail up -d" and than run "docker-compose ps" I see that mysql container not running: myproject_mysql_1 docker-entrypoint.sh mysqld Exit 2 My docker-compose.yml (I changed only "image" property): mysql: image: ‘mysql:5.7’ ..

Read more

Im trying to run a laravel application in a container and I get driver could not be found on migrate. Laravel 8, mysql 8, php 8 docker compose version: "3.9" services: #PHP Service app: build: context: . dockerfile: Dockerfile container_name: app restart: unless-stopped tty: true environment: SERVICE_NAME: app SERVICE_TAGS: dev working_dir: /var/www volumes: – ./:/var/www ..

Read more

I dockerize my laravel project.I use helper url() and request()->getSchemeAndHttpHost() to get domain name in production ,but return container name.This helpers work in local but not work on server.this helper return mining-api. services: api: container_name: mining-api build: ./agahmine_backend working_dir: /var/www/html restart: always volumes:./agahmine_backend:/var/www/html depends_on: db redis Sourc..

Read more

I have a containerized Laravel app. All my containers are running. When I run the command docker-compose exec app php artisan tinker, I get the error ErrorException Writing to directory /home/darula/.config/psysh is not allowed. Other artisan commands like docker compose exec app php artisan migrate work just fine. I tried to change the ownership of ..

Read more

sail shell and sail artisan command has stop working. But sail up and sail down are still working. Version details php: 8.0.5 laravel: 8.41.0 sail: 1.5.1 docker: 3.3.3 os: macOS 11.3.1 My docker-compose.yml file # For more information: https://laravel.com/docs/sail version: ‘3’ services: laravel.test: build: context: ./vendor/laravel/sail/runtimes/8.0 dockerfile: Dockerfile args: WWWGROUP: ‘${WWWGROUP}’ image: sail-8.0/app ports: – ..

Read more

I’ve got trouble using docker-compose. docker-compose picks wrong version of php. networks: laravel: services: nginx: image: nginx:stable-alpine container_name: nginx ports: – "8088:80" volumes: – ./src:/var/www/html – ./nginx/default.conf:/etc/nginx/conf.d/default.conf depends_on: – php – mysql networks: – laravel mysql: image: mysql:5.7.22 container_name: mysql restart: unless-stopped tty: true ports: – "4306:3306" volumes: – ./mysql:/var/lib/mysql environment: MYSQL_DATABASE: wrong MYSQL_USER: wrong ..

Read more

I am running a containerized Laravel application using docker-compose. When I run docker-compose exec laravel_app php artisan migrate:fresh I get the following error IlluminateDatabaseQueryException could not find driver (SQL: select tablename from pg_catalog.pg_tables where schemaname in (‘public’)) I installed the pdo drivers on my Dockerfile. I even tried to have the ini file on my ..

Read more

I’m trying to set up a container for laravel, nginx and mariadb. Containers are running but my laravel application cannot access db container. SQLSTATE[HY000] [1045] Access denied for user ‘root’@’app.app-network’ (using password: NO) (SQL: select * from information_schema.tables where table_schema = appdb and table_name = migrations and table_type = ‘BASE TABLE’) Here is my docker-compose.yml ..

Read more

I’m looking for a minio kes example for docker-compose. I have this but iy’s not working minio_kes: image: ‘minio/kes:latest’ expose: – ‘${KES_PORT:-7373}’ ports: – ‘${KES_PORT:-7373}:7373’ environment: KES_SERVER: ‘${KES_SERVER}’ KES_CLIENT_KEY: ‘${KES_CLIENT_KEY}’ KES_CLIENT_CERT: ‘${KES_CLIENT_CERT}’ KES_ROOT_IDENTITY: ‘${KES_ROOT_CERT}’ command: server –key="$KES_CLIENT_KEY" –cert="$KES_CLIENT_CERT" –root="$KES_ROOT_IDENTITY" –auth=off networks: – sail Sourc..

Read more

I am using docker and docker-compose. I already confirmed that Laravel properly referred to variables of .env.testing in setUp() method as shown below. use RefreshDatabase; public function setUp(): void { dd(env(‘APP_ENV’), env(‘DB_HOST’), env(‘DB_PORT’)); parent::setUp(); } Result "testing" "db-testing" "5432" After RefreshDatabase trait had been executed, DB for the env local was refreshed instead of that ..

Read more

This my first project with k8s and I m trying to deploy my app with 2 images from docker hub database and web , i Used Kompose which is a tool to translate my docker-compose to k8s components, that generated: db-deployment.yaml,db-claim0-persistentvolumeclaim.yaml,db-service.yaml,web-deployment.yaml, web-service.yaml and network-networkpolicy.yaml. well almost work fine just when i check my localhost i ..

Read more

I am out of option . going through many solutions nothing worked . It has been asked by many people but nothing earlier solutions worked for me . .env DB_CONNECTION=mysql DB_HOST=db DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=root config/database.php ‘mysql’ => [ ‘driver’ => ‘mysql’, ‘url’ => env(‘DATABASE_URL’), ‘host’ => env(‘DB_HOST’, ‘db’), ‘port’ => env(‘DB_PORT’, ‘3306’), ‘database’ => ..

Read more