Skip to content

Commit 36279de

Browse files
committed
Added mailpit for email testing, perms for hostside editing and other configs
1 parent a582052 commit 36279de

File tree

5 files changed

+34
-14
lines changed

5 files changed

+34
-14
lines changed

.env.example

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# id -u && id -g
2+
UID=1000
3+
GID=1000
4+
5+
DATABASE_TYPE="mysql"
6+
DATABASE_HOST="db"
17
MYSQL_ROOT_PASSWORD="root"
28
MYSQL_DATABASE="localdb"
39
MYSQL_USER="admin"
@@ -6,4 +12,6 @@ MYSQL_PASSWORD="1234"
612
REDIS_HOST="redis-stack"
713
REDIS_PASSWORD="1234"
814
REDIS_PORT="6379"
9-
REDIS_ARGS="--requirepass 1234"
15+
REDIS_ARGS="--requirepass 1234"
16+
17+
XDG_CONFIG_HOME=/tmp/config

Caddyfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
localhost {
1+
https://localhost {
2+
redir http://localhost{uri}
3+
}
4+
5+
http://localhost {
26
reverse_proxy nginx:80
37
}
48

5-
pma.localhost {
9+
http://pma.localhost {
610
reverse_proxy phpmyadmin:80
7-
}
11+
}

compose.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
- php-fpm
2121
php-fpm:
2222
build: ./build/php/
23+
user: "${UID}:${GID}"
2324
restart: unless-stopped
2425
volumes:
2526
- ./src:/var/www/html
@@ -29,13 +30,15 @@ services:
2930
depends_on:
3031
- db
3132
environment:
32-
DB_HOST: "db" # The db service
33+
DB_CONNECTION: ${DATABASE_TYPE}
34+
DB_HOST: ${DATABASE_HOST} # The db service
3335
DB_DATABASE: ${MYSQL_DATABASE}
3436
DB_USERNAME: ${MYSQL_USER}
3537
DB_PASSWORD: ${MYSQL_PASSWORD}
3638
REDIS_HOST: ${REDIS_HOST}
3739
REDIS_PASSWORD: ${REDIS_PASSWORD}
3840
REDIS_PORT: ${REDIS_PORT}
41+
XDG_CONFIG_HOME: ${XDG_CONFIG_HOME}
3942
phpmyadmin:
4043
image: phpmyadmin/phpmyadmin
4144
environment:
@@ -44,6 +47,8 @@ services:
4447
db:
4548
image: mysql
4649
restart: always
50+
volumes:
51+
- ./config/mysql/my.cnf:/etc/mysql/my.cnf:ro
4752
environment:
4853
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
4954
MYSQL_DATABASE: ${MYSQL_DATABASE}
@@ -58,14 +63,19 @@ services:
5863
working_dir: /app
5964
volumes:
6065
- ./src:/app
61-
redis-stack:
62-
image: redis/redis-stack:latest
66+
# redis-stack:
67+
# image: redis/redis-stack:latest
68+
# ports:
69+
# - "8001:8001"
70+
# environment:
71+
# REDIS_ARGS: ${REDIS_ARGS}
72+
# volumes:
73+
# - redis_stack_data:/data
74+
mailpit:
75+
image: axllent/mailpit
76+
restart: unless-stopped
6377
ports:
64-
- "8001:8001"
65-
environment:
66-
REDIS_ARGS: ${REDIS_ARGS}
67-
volumes:
68-
- redis_stack_data:/data
78+
- "8025:8025"
6979

7080
volumes:
7181
caddy_data:

config/mysql/my.cnf

Whitespace-only changes.

src/test.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)