Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Add] docker-compose && update dockerfile #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM php:7.4-apache
FROM ubuntu

RUN apt-get update \
&& apt-get install -y git libzip-dev default-mysql-client \
&& docker-php-ext-install zip opcache mysqli pdo pdo_mysql \
&& a2enmod rewrite \
&& sed -i 's!/var/www/html!/var/www/default/public!g' /etc/apache2/apache2.conf \
&& sed -i 's!/var/www/html!/var/www/default/public!g' /etc/apache2/sites-available/000-default.conf
ENV DEBIAN_FRONTEND noninteractive

WORKDIR /var/www
RUN apt update && apt install -y tcl php unzip git wget

RUN wget https://github.com/KumbiaPHP/KumbiaPHP/archive/refs/tags/v1.2.0.zip && unzip v1.2.0.zip && \
mkdir -p /PoC && mv KumbiaPHP-1.2.0/ /PoC

COPY databases.php /PoC/KumbiaPHP-1.2.0/default/app/config/databases.php
WORKDIR /PoC/KumbiaPHP-1.2.0/default/app
RUN ls /PoC/KumbiaPHP-1.2.0/default/app
CMD ["bin/phpserver"]
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# docker
Docker files for KumbiaPHP
# KumbiaPHP container

this repository is used to launch KumbiaPHP as a container

# Build

 `docker build --progress=plain --no-cache -t kumbia .`

# Usage


`docker-compose up -d` or `docker run -p 8000:8001 --name poc -it kumbia`
21 changes: 21 additions & 0 deletions databases.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

return [
'development' => [
'host' => 'localhost',
'username' => 'root',
'password' => 'ChangeMe24k!',
'name' => 'test',
'type' => 'mysql',
'charset' => 'utf8',
],

'production' => [
'host' => 'localhost',
'username' => 'root',
'password' => 'ChangeMe24k!',
'name' => 'test',
'type' => 'mysql',
'charset' => 'utf8',
],
];
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.8'
services:
kumbia:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8001"
depends_on:
- mysql
mysql:
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'ChangeMe24k!'