From fbce1c819709dcdbe9055c82ec29f3d02d44754a Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sat, 8 Jul 2023 07:21:16 +0200 Subject: [PATCH] Update the docker configuration so that it uses Mailpit and it runs from port 80 instead of 8000 --- docker-compose.yml | 16 ++++++++-------- docs/docker.md | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d4737950..dfaf1bdc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: - '.:/var/www/html' - './docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf' ports: - - '8000:80' + - '80:80' mysql: image: 'mysql:8.0' @@ -25,20 +25,20 @@ services: environment: - MYSQL_ROOT_PASSWORD=secret - MYSQL_DATABASE=easyappointments - - MYSQL_USER=easyappointments - - MYSQL_PASSWORD=secret + - MYSQL_USER=user + - MYSQL_PASSWORD=password ports: - - '8001:3306' + - '3306:3306' phpmyadmin: image: 'phpmyadmin:5.2.1' ports: - - '8002:80' + - '8080:80' environment: - 'PMA_HOST=mysql' - mailhog: - image: 'mailhog/mailhog:v1.0.1' + mailpit: + image: 'axllent/mailpit:v1.7' ports: - - '8003:8025' + - '8025:8025' - '1025:1025' diff --git a/docs/docker.md b/docs/docker.md index 98a90fc6..1976b312 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -12,7 +12,7 @@ class Config { // GENERAL SETTINGS // ------------------------------------------------------------------------ - const BASE_URL = 'http://localhost:8000'; + const BASE_URL = 'http://localhost'; const LANGUAGE = 'english'; const DEBUG_MODE = TRUE; @@ -22,8 +22,8 @@ class Config { const DB_HOST = 'mysql'; const DB_NAME = 'easyappointments'; - const DB_USERNAME = 'easyappointments'; - const DB_PASSWORD = 'secret'; + const DB_USERNAME = 'user'; + const DB_PASSWORD = 'password'; // ------------------------------------------------------------------------ // GOOGLE CALENDAR SYNC @@ -37,11 +37,11 @@ class Config { } ``` -In the host machine the server is accessible from `http://localhost:8000` and the database from `localhost:8001`. +In the host machine the server is accessible from `http://localhost` and the database from `localhost:3306`. -You can additionally access phpMyAdmin from `http://localhost:8002` (credentials are `root` / `secret`) and MailHog from `http://localhost:8003`. +You can additionally access phpMyAdmin from `http://localhost:8080` (credentials are `root` / `secret`) and Mailpit from `http://localhost:8025`. -**Attention:** This configuration is mend to make development easier. It is not intended to server as a production environment! +**Attention:** This configuration is meant to make development easier. It is not intended to server as a production environment! A production image of Easy!Appointments can be found at: https://github.com/alextselegidis/easyappointments-docker