Codeigniter 4 and Docker |
I guess you don't have a MySQL database configured ...
Create an empty folder on the server Inside the folder you created, add a new file and call it docker-compose.yml Code: version: "3" Change the following values Code: MYSQL_ROOT_PASSWORD: rootpassword Now connect with the console in the path where you stored the file docker-compose.yml and type Code: docker-compose up -d The necessary folders will be created and the services will start. Now you need to configure codeigiter to connect to the mysql server at the localhost address on port 3306 at http://yourserver you will find codeigniter at http://yourserver:81 replies phpmyadmin To stop the services, always inside the folder where the docker-compose.yml file is located, you can type Code: docker-compose down --volumes Codeigniter 4 - Docker Image [github] [docker hub]
(09-26-2019, 07:38 AM)ciadmin Wrote: Manual install is still an option (https://codeigniter4.github.io/userguide...anual.html). Looking forward to it, I've been waiting for this kind of thread.
"The capacity to learn is a gift, the ability to learn is a skill, but the willingness to learn is a choice."
The image of the CodeIgniter docker hub has been updated to v4.0.3
Codeigniter 4 - Docker Image [github] [docker hub]
Hello,
I've created some tutorials on how to set up Docker containers for CodeIgniter. Please, give them a try, and tell me your opinion: https://avenir.ro/codeigniter-4/codeigni...che-mysql/ https://avenir.ro/codeigniter-4/install-...ontainers/ Website: http://avenir.ro
(04-13-2020, 10:31 AM)atsanna Wrote: I have improved the docker file and want to share the changes with you.Thank you! codeigniter4-docker worked for me.
version: "3"
services: # C O D E I G N I T E R v4.1.8 codeigniter4: # image: atsanna/codeigniter4:latest # image: atsanna/codeigniter4:v4.1.8-php7.4 image: atsanna/codeigniter4:v4.1.8-php8.0 container_name: 'codeigniter4' ports: - 8000:80 links: - codeigniter4_mysql volumes: - .:/var/www/html/codeigniter4 # M Y S Q L codeigniter4_mysql: image: mariadb:10.5.5 container_name: 'codeigniter4_mysql' ports: - 3306:3306 # volumes: # - ./localfolder/mysql:/var/lib/mysql # - ./localfolder/logs/mysql:/var/log/mysql environment: MYSQL_ROOT_PASSWORD: rootpassword MYSQL_DATABASE: codeigniter4 MYSQL_USER: codeigniter4 MYSQL_PASSWORD: codeigniter4 # unComment if you need # P H P M Y A D M I N # codeigniter4_phpmyadmin: # image: phpmyadmin/phpmyadmin:5.0.2 # container_name: 'codeigniter4_phpmyadmin' # links: # - codeigniter4_mysql # environment: # PMA_HOST: codeigniter4_mysql # PMA_PORT: 3306 # ports: # - 81:80 # volumes: # - ./localfolder/sessions:/sessions |
Welcome Guest, Not a member yet? Register Sign In |