mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-21 15:32:21 +03:00
Updated the docker configuration, using PHP 7.4 and MySQL v5.7, CAPTCHA also works now (#447).
This commit is contained in:
parent
0b50814cf4
commit
3e991516a1
6 changed files with 55 additions and 37 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -5,8 +5,8 @@
|
||||||
/docs/apigen/html
|
/docs/apigen/html
|
||||||
/docs/jsdoc/html
|
/docs/jsdoc/html
|
||||||
/docs/plato/html
|
/docs/plato/html
|
||||||
/docker/.env*
|
/docker/mysql/*
|
||||||
!/docker/.env.example
|
!/docker/mysql/.gitkeep
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/npm-debug.log
|
/npm-debug.log
|
||||||
/assets/js/**/*.min.js
|
/assets/js/**/*.min.js
|
||||||
|
|
|
@ -1,27 +1,21 @@
|
||||||
version: '2'
|
version: "3.1"
|
||||||
services:
|
services:
|
||||||
database:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
environment:
|
container_name: easyappointments-database
|
||||||
- MYSQL_DATABASE=${DB_NAME}
|
|
||||||
- MYSQL_USER=${DB_USERNAME}
|
|
||||||
- MYSQL_PASSWORD=${DB_PASSWORD}
|
|
||||||
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
|
|
||||||
|
|
||||||
application:
|
|
||||||
image: easyappointments
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../src:/var/www/html
|
- ./mysql:/var/lib/mysql
|
||||||
command: dev
|
|
||||||
ports:
|
|
||||||
- ${APP_HOST}:80:80
|
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=database:3306
|
- MYSQL_ROOT_PASSWORD=root
|
||||||
- APP_URL=localhost
|
- MYSQL_DATABASE=easyappointments
|
||||||
depends_on:
|
ports:
|
||||||
- database
|
- "8001:3306"
|
||||||
env_file:
|
server:
|
||||||
- .env
|
build: ./server
|
||||||
restart: always
|
image: easyappointments-server:v1
|
||||||
|
container_name: easyappointments-server
|
||||||
|
ports:
|
||||||
|
- "8000:80"
|
||||||
|
volumes:
|
||||||
|
- ../:/var/www/html
|
||||||
|
- ./server/php.ini:/usr/local/etc/php/conf.d/99-overrides.ini
|
||||||
|
|
0
docker/mysql/.gitkeep
Normal file
0
docker/mysql/.gitkeep
Normal file
15
docker/server/Dockerfile
Normal file
15
docker/server/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
FROM php:7.4-apache
|
||||||
|
|
||||||
|
WORKDIR "/var/www/html"
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libpng-dev \
|
||||||
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
|
&& docker-php-ext-install -j$(nproc) gd gettext mysqli pdo_mysql
|
||||||
|
|
||||||
|
RUN pecl install xdebug \
|
||||||
|
&& docker-php-ext-enable xdebug
|
5
docker/server/php.ini
Normal file
5
docker/server/php.ini
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
date.timezone=UTC
|
||||||
|
upload_max_filesize = 100M
|
||||||
|
post_max_size = 100M
|
||||||
|
xdebug.remote_enable=on
|
||||||
|
max_execution_time=0
|
|
@ -1,14 +1,12 @@
|
||||||
# Docker
|
# Docker
|
||||||
|
|
||||||
Run the development containers of Easy!Appointments with Docker and Docker Compose utility. Docker allows you to compose your application from micro-services, without worrying about inconsistencies between development and production environments and without locking into any platform or language.
|
Run the development containers of Easy!Appointments with Docker and Docker Compose utility. Docker allows you to compose
|
||||||
|
your application from micro-services, without worrying about inconsistencies between development and production
|
||||||
|
environments and without locking into any platform or language.
|
||||||
|
|
||||||
Copy the `.env.example` file to `.env` inside the `docker` directory and set the desired environment variables.
|
Enter the `docker` directory and run `docker-compose up` to start the environment.
|
||||||
|
|
||||||
Make sure that you have Docker and Docker Compose installed and configured in your system and execute the following command through your terminal while being in `docker` directory of your Git clone:
|
You will need modify the root `config.php` so that it matches the following example:
|
||||||
|
|
||||||
`docker-compose up`
|
|
||||||
|
|
||||||
Then modify the root `config.php` so that it matches the following example:
|
|
||||||
|
|
||||||
```php
|
```php
|
||||||
class Config {
|
class Config {
|
||||||
|
@ -16,7 +14,7 @@ class Config {
|
||||||
// GENERAL SETTINGS
|
// GENERAL SETTINGS
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
const BASE_URL = 'http://{DOCKER-SERVER-IP}'; // e.g. 192.168.99.100
|
const BASE_URL = 'http://localhost:8000';
|
||||||
const LANGUAGE = 'english';
|
const LANGUAGE = 'english';
|
||||||
const DEBUG_MODE = TRUE;
|
const DEBUG_MODE = TRUE;
|
||||||
|
|
||||||
|
@ -24,16 +22,16 @@ class Config {
|
||||||
// DATABASE SETTINGS
|
// DATABASE SETTINGS
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
const DB_HOST = 'database:3306';
|
const DB_HOST = 'easyappointments-database:3306';
|
||||||
const DB_NAME = 'easyappointments';
|
const DB_NAME = 'easyappointments';
|
||||||
const DB_USERNAME = 'easyappointments';
|
const DB_USERNAME = 'root';
|
||||||
const DB_PASSWORD = 'easyappointments';
|
const DB_PASSWORD = 'root';
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// GOOGLE CALENDAR SYNC
|
// GOOGLE CALENDAR SYNC
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
const GOOGLE_SYNC_FEATURE = FALSE;
|
const GOOGLE_SYNC_FEATURE = FALSE; // You can optionally enable the Google Sync feature.
|
||||||
const GOOGLE_PRODUCT_NAME = '';
|
const GOOGLE_PRODUCT_NAME = '';
|
||||||
const GOOGLE_CLIENT_ID = '';
|
const GOOGLE_CLIENT_ID = '';
|
||||||
const GOOGLE_CLIENT_SECRET = '';
|
const GOOGLE_CLIENT_SECRET = '';
|
||||||
|
@ -41,6 +39,12 @@ class Config {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In the host machine the server is accessible from `http://localhost:8000` and the database from `localhost:8001`.
|
||||||
|
|
||||||
|
You can remove the docker containers with `docker rm easyappointments-server easyappointments-database`.
|
||||||
|
|
||||||
|
You can remove the server image with `docker rmi easyappointments-server:v1`.
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.0.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
Loading…
Reference in a new issue