2022-10-19 15:37:13 +00:00
|
|
|
version: "3"
|
2022-07-23 20:38:49 +00:00
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
myapp1:
|
2022-12-05 10:47:56 +00:00
|
|
|
image: php:fpm-alpine3.17
|
|
|
|
|
# ⚠️ UID and GID of mywww (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️
|
2022-07-23 20:38:49 +00:00
|
|
|
# but both needs access to the files and folders of web-files
|
|
|
|
|
# don't forget to edit the permissions of the files and folders accordingly
|
2022-12-05 10:47:56 +00:00
|
|
|
# example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \;
|
2022-07-23 20:38:49 +00:00
|
|
|
volumes:
|
|
|
|
|
- ./bw-data/www/app1.example.com:/app # folder containing PHP app1 (don't forget to rename it)
|
|
|
|
|
networks:
|
|
|
|
|
bw-services:
|
|
|
|
|
aliases:
|
|
|
|
|
- myapp1
|
|
|
|
|
labels:
|
|
|
|
|
- bunkerweb.SERVER_NAME=app1.example.com
|
|
|
|
|
- bunkerweb.REMOTE_PHP=myapp1
|
|
|
|
|
- bunkerweb.REMOTE_PHP_PATH=/app
|
|
|
|
|
|
|
|
|
|
myapp2:
|
2022-12-05 10:47:56 +00:00
|
|
|
image: php:fpm-alpine3.17
|
|
|
|
|
# ⚠️ UID and GID of bunkerweb (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️
|
2022-07-23 20:38:49 +00:00
|
|
|
# but both needs access to the files and folders of web-files
|
|
|
|
|
# don't forget to edit the permissions of the files and folders accordingly
|
2022-12-05 10:47:56 +00:00
|
|
|
# example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \;
|
2022-07-23 20:38:49 +00:00
|
|
|
volumes:
|
|
|
|
|
- ./bw-data/www/app2.example.com:/app # folder containing PHP app2 (don't forget to rename it)
|
|
|
|
|
networks:
|
|
|
|
|
bw-services:
|
|
|
|
|
aliases:
|
|
|
|
|
- myapp2
|
|
|
|
|
labels:
|
|
|
|
|
- bunkerweb.SERVER_NAME=app2.example.com
|
|
|
|
|
- bunkerweb.REMOTE_PHP=myapp2
|
|
|
|
|
- bunkerweb.REMOTE_PHP_PATH=/app
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
bw-services:
|
|
|
|
|
external:
|
2022-10-19 15:37:13 +00:00
|
|
|
name: bw-services
|