-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
FROM php:8.0-fpm-alpine3.14 | ||
RUN apk add --no-cache composer nginx php-mysqli | ||
FROM php:8-fpm-alpine | ||
RUN apk add --no-cache composer php-mysqli | ||
RUN docker-php-ext-install mysqli | ||
RUN docker-php-ext-enable mysqli | ||
RUN rm -rf /var/www/* | ||
COPY --chown=www-data:www-data ./ /var/www | ||
COPY ./resources/nginx.conf /etc/nginx/nginx.conf | ||
COPY ./resources/php.ini $PHP_INI_DIR/php.ini | ||
RUN composer install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --no-scripts --optimize-autoloader -d /var/www | ||
CMD php-fpm -D; nginx; tail -F /dev/null; | ||
USER 1025 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,46 @@ | ||
version: "3" | ||
version: "3.3" | ||
services: | ||
web: | ||
|
||
php: | ||
build: . | ||
container_name: web | ||
environment: | ||
MYSQL_HOST: db | ||
MYSQL_PORT: 3306 | ||
MYSQL_USER: guest-portal | ||
MYSQL_PASSWORD: guest-portal | ||
MYSQL_DATABASE: guest-portal | ||
MYSQL_PORT: 3306 | ||
UNIFI_USER: guest-portal | ||
UNIFI_PASSWORD: password | ||
UNIFI_URL: https://192.168.0.1 | ||
UNIFI_SITE: default | ||
UNIFI_VERSION: 6.0.43 | ||
UNIFI_VERIFY_CERT: 0 | ||
ports: | ||
- "8080:80" | ||
volumes: | ||
- ./:/app | ||
- "./:/var/www:ro" | ||
|
||
nginx: | ||
image: nginx | ||
restart: unless-stopped | ||
user: nginx | ||
volumes: | ||
- "./resources/nginx.conf:/etc/nginx/nginx.conf:ro" | ||
- "./:/var/www:ro" | ||
read_only: true | ||
tmpfs: | ||
- /tmp | ||
ports: | ||
- "8080:8080" | ||
|
||
db: | ||
image: linuxserver/mariadb:alpine | ||
container_name: db | ||
volumes: | ||
- mysql:/var/lib/mysql | ||
- ./resources/db-template.sql:/docker-entrypoint-initdb.d/db.sql | ||
environment: | ||
MYSQL_ROOT_PASSWORD: password | ||
MYSQL_RANDOM_ROOT_PASSWORD: 1 | ||
MYSQL_USER: guest-portal | ||
MYSQL_PASSWORD: guest-portal | ||
MYSQL_DATABASE: guest-portal | ||
phpmyadmin: | ||
container_name: phpmyadmin | ||
image: phpmyadmin | ||
ports: | ||
- "81:80" | ||
|
||
volumes: | ||
mysql: | ||
mysql: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters