From 3faf8a698ad6d5084d23dd24bde568503e11ef80 Mon Sep 17 00:00:00 2001 From: dimti Date: Wed, 20 Nov 2024 15:36:12 +0300 Subject: [PATCH 1/2] + root mariadb account default extra file * pma and inbucket port presented in docker compose example file (do not use that for prod environment with this docker structure build) --- config/mariadb/root-account.cnf.example | 3 +++ docker-compose.base.yml | 2 ++ docker-compose.yml.example | 4 ++++ src/dockerfiles/php-fpm/php81.Dockerfile | 1 + 4 files changed, 10 insertions(+) create mode 100644 config/mariadb/root-account.cnf.example diff --git a/config/mariadb/root-account.cnf.example b/config/mariadb/root-account.cnf.example new file mode 100644 index 0000000..da682f9 --- /dev/null +++ b/config/mariadb/root-account.cnf.example @@ -0,0 +1,3 @@ +[client] +user = root +password = 123456 \ No newline at end of file diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 2f75f28..ac1c13c 100755 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -71,6 +71,8 @@ services: inbucket: image: inbucket/inbucket restart: always + expose: + - 2500 redis: image: redis restart: always diff --git a/docker-compose.yml.example b/docker-compose.yml.example index d932f3f..077ac08 100755 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -55,10 +55,14 @@ services: extends: file: docker-compose.base.yml service: pma + ports: + - "81:80" inbucket: extends: file: docker-compose.base.yml service: inbucket + ports: + - "82:9000" dnsmasq: restart: always build: diff --git a/src/dockerfiles/php-fpm/php81.Dockerfile b/src/dockerfiles/php-fpm/php81.Dockerfile index c194494..a6dd4d0 100644 --- a/src/dockerfiles/php-fpm/php81.Dockerfile +++ b/src/dockerfiles/php-fpm/php81.Dockerfile @@ -1,4 +1,5 @@ # syntax = edrevo/dockerfile-plus +# https://github.com/docker-library/php/blob/52062af5056d0cd91fa5ded64fad8f9c82847b49/8.1/bookworm/fpm/Dockerfile FROM php:8.1-fpm INCLUDE+ ./php.base.Dockerfile From 4e0c2dbfc4513cf63f3cdce6038241b89b8732ba Mon Sep 17 00:00:00 2001 From: dimti Date: Mon, 25 Nov 2024 09:13:53 +0300 Subject: [PATCH 2/2] * minor local changes - unused shell aliases and some slash --- dockerfiles/workspace/.bash_aliases.example | 6 ++++++ dockerfiles/workspace/.gitignore | 3 ++- dockerfiles/workspace/{aliases.sh.example => .shell-aliases} | 11 ++++------- src/dockerfiles/workspace/workspace.base.Dockerfile | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 dockerfiles/workspace/.bash_aliases.example rename dockerfiles/workspace/{aliases.sh.example => .shell-aliases} (87%) diff --git a/dockerfiles/workspace/.bash_aliases.example b/dockerfiles/workspace/.bash_aliases.example new file mode 100644 index 0000000..1c5ce02 --- /dev/null +++ b/dockerfiles/workspace/.bash_aliases.example @@ -0,0 +1,6 @@ +alias gst='git status' +alias ga='git add' +alias gc='git commit -m' +alias gush='git push' +alias gull='git pull' +alias gb='git branch' diff --git a/dockerfiles/workspace/.gitignore b/dockerfiles/workspace/.gitignore index d02ad3c..b6c97b1 100644 --- a/dockerfiles/workspace/.gitignore +++ b/dockerfiles/workspace/.gitignore @@ -1,2 +1,3 @@ -/aliases.sh +/.bash_* +!/.bash_.example /crontab diff --git a/dockerfiles/workspace/aliases.sh.example b/dockerfiles/workspace/.shell-aliases similarity index 87% rename from dockerfiles/workspace/aliases.sh.example rename to dockerfiles/workspace/.shell-aliases index b497e54..e1d9ce4 100644 --- a/dockerfiles/workspace/aliases.sh.example +++ b/dockerfiles/workspace/.shell-aliases @@ -1,4 +1,5 @@ -#! /bin/bash +# If not running interactively, don't do anything +[ -z "$PS1" ] && return # Colors used for status updates ESC_SEQ="\x1b[" @@ -22,9 +23,5 @@ fi # Always use color output for `ls` alias ls="command ls ${colorflag}" -alias gst='git status' -alias ga='git add' -alias gc='git commit -m' -alias gush='git push' -alias gull='git pull' -alias gb='git branch' +# Source global definitions +test -r ~/.bash_aliases && . ~/.bash_aliases diff --git a/src/dockerfiles/workspace/workspace.base.Dockerfile b/src/dockerfiles/workspace/workspace.base.Dockerfile index d404d3f..ade936f 100644 --- a/src/dockerfiles/workspace/workspace.base.Dockerfile +++ b/src/dockerfiles/workspace/workspace.base.Dockerfile @@ -74,7 +74,7 @@ RUN sed -i 's/\r//' /root/aliases.sh && \ echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ echo "source ~/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc \ + echo "" >> ~/.bashrc ########################################################################### # ssh: