Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Feature/Add a GUI #7

Draft
wants to merge 21 commits into
base: develop
Choose a base branch
from
Draft
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.idea
.idea
.db_data
!**/__pycache__/
gui/app.glade~
.vscode
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
SHELL := /bin/bash

## === HELP ==================================================
help: ## Show this help.
@echo "DockerQA Makefile"
@echo "---------------------------"
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
#---------------------------------------------#

## === PULL REQUESTS ================================================
install-pr: ## Load regular PR with the following parameters ${1} = folder name /// ${2} = PR branch /// ${number} = PR number
gnome-terminal -- echo "install PR ${number} on ${name} folder and ${branch} branch"
.PHONY: install-pr
#---------------------------------------------#

## === REPOSITORIES =============================================
clone-repo: ## Clone branch with the following parameters ${1} = repo branch /// ${2} = folder name
gnome-terminal -- ./scripts/clone.sh ${branch} ${name}
.PHONY: clone-repo

reset-repo: ## Reset repository with the following parameters ${1} = repo branch /// ${2} = folder name
gnome-terminal -- echo "reset repo !!"
.PHONY: reset-repo

delete-repo: ## Delete repository with the following parameters ${1} = folder to delete
gnome-terminal -- ./scripts/delete.sh ${name}
.PHONY: delete-repo
#-----------------------------------------------#
55 changes: 44 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,80 @@
# dockerQA


- php 7.1
- php 7.2
- php 7.3
- php 7.4
- php 8.0
- mysql 5.7
- mariadb 10.1
- phpmyadmin

## How to install

If the stack is not yet installed on your device
```

To clone the repo:

```shell
git clone https://github.com/SD1982/dockerQA.git
cd dockerQA
bash build.sh
```

If your UID=1000 and GID=1000:

```shell
docker compose up
```

If not:

```shell
APP_UID=$(id -u) APP_GID=$(id -g) docker-compose up
```

## How to start
If the stack is already install to your device

If the stack is already install to your device:

```
cd dockerQA
docker-compose up -d
```

## How to use

Add your php app folder (like prestashop for example) in the html folder
go to your localhost with the required port for the required php version

## php versions

- php 7.1 is at localhost:8071/your-app-folder-name

- php 7.2 is at localhost:8072/your-app-folder-name

- php 7.3 is at localhost:8073/your-app-folder-name
- php 7.4 is at localhost:8074/your-app-folder-name

- php 7.4 is at localhost:8074/your-app-folder-name

- php 8.0 is at localhost:8008/your-app-folder-name

## databases

### from outside container
- mysql 5.7 is at localhost:3306 (user = root, password = root)
- mariadb is at localhost:3307 (user = root, password = root)
### from outside container
- mysql 5.7 is at localhost:3306 or with container name qa-mysql-5.7

- mysql 5.7 is at localhost:33006 (user = root, password = root)

- mariadb is at localhost:33007 (user = root, password = root)

### from inside container

- mysql 5.7 is at localhost:33006 or with container name qa-mysql-5.7
(user = root, password = root)
- mariadb is at localhost:3307 or with container name qa-mariadb-5.7

- mariadb is at localhost:33007 or with container name qa-mariadb-5.7
(user = root, password = root)

## phpmyadmin
- phpmyadmin is accessible at localhost:8100 and can connect to both databases

- phpmyadmin is accessible at localhost:8100 and can connect to both databases
(server = (qa-mysql-5.7 or qa-mariadb-10.1) user = root, password = root)
20 changes: 0 additions & 20 deletions build.sh

This file was deleted.

41 changes: 35 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
networks:
- web
ports:
- "3307:3306"
- "33007:3306"
restart: always
volumes:
- "./db_data/mariadb-10.1:/var/lib/mysql"
Expand All @@ -26,7 +26,7 @@ services:
networks:
- web
ports:
- "3306:3306"
- "33006:3306"
restart: always
volumes:
- "./db_data/mysql-5.7:/var/lib/mysql"
Expand All @@ -46,55 +46,84 @@ services:
build:
dockerfile: php-7.1.Dockerfile
context: ./php/dockerfiles/
args:
- APP_UID=${APP_UID:-1000}
- APP_GID=${APP_GID:-1000}
container_name: qa-php-7.1
restart: always
volumes:
- ./html/:/var/www/html
- ./php/config/php71/conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
ports:
- 8071:80
- "8071:80"
networks:
- web

php72:
build:
dockerfile: php-7.2.Dockerfile
context: ./php/dockerfiles/
args:
- APP_UID=${APP_UID:-1000}
- APP_GID=${APP_GID:-1000}
container_name: qa-php-7.2
restart: always
volumes:
- ./html/:/var/www/html
- ./php/config/php72/conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
ports:
- 8072:80
- "8072:80"
networks:
- web

php73:
build:
dockerfile: php-7.3.Dockerfile
context: ./php/dockerfiles/
args:
- APP_UID=${APP_UID:-1000}
- APP_GID=${APP_GID:-1000}
container_name: qa-php-7.3
restart: always
volumes:
- ./html/:/var/www/html
- ./php/config/php73/conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
ports:
- 8073:80
- "8073:80"
networks:
- web

php74:
build:
dockerfile: php-7.4.Dockerfile
context: ./php/dockerfiles/
args:
- APP_UID=${APP_UID:-1000}
- APP_GID=${APP_GID:-1000}
container_name: qa-php-7.4
restart: always
volumes:
- ./html/:/var/www/html
- ./php/config/php74/conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
ports:
- 8074:80
- "8074:80"
networks:
- web

php80:
build:
dockerfile: php-8.0.Dockerfile
context: ./php/dockerfiles/
args:
- APP_UID=${APP_UID:-1000}
- APP_GID=${APP_GID:-1000}
container_name: qa-php-8.0
restart: always
volumes:
- ./html/:/var/www/html
- ./php/config/php80/conf.d/php.ini:/usr/local/etc/php/conf.d/php.ini
ports:
- "8008:80"
networks:
- web

Expand Down
Loading