Update the docker configuration so that it uses Mailpit and it runs from port 80 instead of 8000

This commit is contained in:
Alex Tselegidis 2023-07-08 07:21:16 +02:00
parent 83e2f4acaf
commit fbce1c8197
2 changed files with 14 additions and 14 deletions

View file

@ -16,7 +16,7 @@ services:
- '.:/var/www/html' - '.:/var/www/html'
- './docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf' - './docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
ports: ports:
- '8000:80' - '80:80'
mysql: mysql:
image: 'mysql:8.0' image: 'mysql:8.0'
@ -25,20 +25,20 @@ services:
environment: environment:
- MYSQL_ROOT_PASSWORD=secret - MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=easyappointments - MYSQL_DATABASE=easyappointments
- MYSQL_USER=easyappointments - MYSQL_USER=user
- MYSQL_PASSWORD=secret - MYSQL_PASSWORD=password
ports: ports:
- '8001:3306' - '3306:3306'
phpmyadmin: phpmyadmin:
image: 'phpmyadmin:5.2.1' image: 'phpmyadmin:5.2.1'
ports: ports:
- '8002:80' - '8080:80'
environment: environment:
- 'PMA_HOST=mysql' - 'PMA_HOST=mysql'
mailhog: mailpit:
image: 'mailhog/mailhog:v1.0.1' image: 'axllent/mailpit:v1.7'
ports: ports:
- '8003:8025' - '8025:8025'
- '1025:1025' - '1025:1025'

View file

@ -12,7 +12,7 @@ class Config {
// GENERAL SETTINGS // GENERAL SETTINGS
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
const BASE_URL = 'http://localhost:8000'; const BASE_URL = 'http://localhost';
const LANGUAGE = 'english'; const LANGUAGE = 'english';
const DEBUG_MODE = TRUE; const DEBUG_MODE = TRUE;
@ -22,8 +22,8 @@ class Config {
const DB_HOST = 'mysql'; const DB_HOST = 'mysql';
const DB_NAME = 'easyappointments'; const DB_NAME = 'easyappointments';
const DB_USERNAME = 'easyappointments'; const DB_USERNAME = 'user';
const DB_PASSWORD = 'secret'; const DB_PASSWORD = 'password';
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// GOOGLE CALENDAR SYNC // 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 A production image of Easy!Appointments can be found at: https://github.com/alextselegidis/easyappointments-docker