61 lines
2.2 KiB
YAML
61 lines
2.2 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
myapp1:
|
|
image: php:fpm
|
|
networks:
|
|
bw-services:
|
|
aliases:
|
|
- myapp1
|
|
# ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️
|
|
# 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
|
|
# example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \;
|
|
volumes:
|
|
- ./www/app1.example.com:/app # folder containing PHP app1 (don't forget to rename it)
|
|
labels:
|
|
- bunkerweb.SERVER_NAME=app1.example.com
|
|
- bunkerweb.USE_CORS=yes
|
|
- bunkerweb.CORS_ALLOW_ORIGIN=https://app2.example.com
|
|
- bunkerweb.REMOTE_PHP=myapp1
|
|
- bunkerweb.REMOTE_PHP_PATH=/app
|
|
|
|
myapp2:
|
|
image: php:fpm
|
|
networks:
|
|
bw-services:
|
|
aliases:
|
|
- myapp2
|
|
# ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️
|
|
# 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
|
|
# example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \;
|
|
volumes:
|
|
- ./www/app2.example.com:/app # folder containing PHP app2 (don't forget to rename it)
|
|
labels:
|
|
- bunkerweb.SERVER_NAME=app2.example.com
|
|
- bunkerweb.REMOTE_PHP=myapp2
|
|
- bunkerweb.REMOTE_PHP_PATH=/app
|
|
|
|
myapp3:
|
|
image: php:fpm
|
|
networks:
|
|
bw-services:
|
|
aliases:
|
|
- myapp3
|
|
# ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️
|
|
# 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
|
|
# example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \;
|
|
volumes:
|
|
- ./www/app3.example.com:/app # folder containing PHP app3 (don't forget to rename it)
|
|
labels:
|
|
- bunkerweb.SERVER_NAME=app3.example.com
|
|
- bunkerweb.REMOTE_PHP=myapp3
|
|
- bunkerweb.REMOTE_PHP_PATH=/app
|
|
|
|
networks:
|
|
bw-services:
|
|
external: true
|
|
name: bw-services
|