-
Notifications
You must be signed in to change notification settings - Fork 1
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
4 changed files
with
262 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
COMPOSE_PROJECT_NAME=CaseTracker | ||
|
||
MYSQL_USER=local | ||
MYSQL_PASSWORD=local | ||
MYSQL_DB_NAME=local |
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 |
---|---|---|
@@ -0,0 +1,159 @@ | ||
services: | ||
|
||
|
||
# https://github.com/filamentphp/demo | ||
# http://127.0.0.1:8002 | ||
# docker compose exec fd sh | ||
# docker compose up -d --no-deps --build fd | ||
fd: | ||
build: | ||
context: . | ||
dockerfile: ./docker/php82.Dockerfile | ||
depends_on: | ||
- dbmsql | ||
# networks: | ||
# - internal | ||
ports: | ||
- "127.0.0.1:8002:80" | ||
environment: | ||
APP_URL: http://localhost:8001/ | ||
DB_CONNECTION: mysql | ||
DB_HOST: dbmsql | ||
DB_NAME: filament-demo | ||
DB_USER: filament-demo | ||
DB_PASSWORD: filament-demo | ||
volumes: | ||
- ./:/app | ||
|
||
|
||
# cli tools | ||
# | ||
# docker compose exec cli bash | ||
# docker compose up -d --no-deps --build cli | ||
cli: | ||
# image: ubuntu:latest | ||
# working_dir: /app | ||
build: | ||
context: . | ||
dockerfile: ./docker/cli.Dockerfile | ||
volumes: | ||
- ./:/app | ||
# command: tail -f /dev/null | ||
|
||
|
||
# DB manager | ||
# http://127.0.0.1:8000 | ||
# docker compose exec adminer sh | ||
# docker compose up -d --no-deps --build adminer | ||
adminer: | ||
image: wodby/adminer | ||
depends_on: | ||
- dbmsql | ||
# networks: | ||
# - internal | ||
restart: unless-stopped | ||
ports: | ||
- 8000:9000 | ||
environment: | ||
ADMINER_DEFAULT_DB_HOST: dbmsql:3306 | ||
ADMINER_DEFAULT_DB_NAME: ${MYSQL_DB_NAME} | ||
volumes: | ||
- ./data:/app | ||
- ./docker/adminer/login-password-less.php:/var/www/html/plugins-enabled/login-password-less.php | ||
|
||
|
||
# docker compose up -d --no-deps --build dbmsql | ||
dbmsql: | ||
image: mysql:8.0 | ||
restart: unless-stopped | ||
# networks: | ||
# - internal | ||
environment: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: ${MYSQL_DB_NAME} | ||
MYSQL_USER: ${MYSQL_USER} | ||
MYSQL_PASSWORD: ${MYSQL_PASSWORD} | ||
volumes: | ||
- ./data/dbmsql:/var/lib/mysql | ||
|
||
|
||
# docker compose up -d --no-deps --build dbmsql5 | ||
dbmsql5: | ||
image: mysql:5.7 | ||
platform: linux/x86_64 | ||
restart: unless-stopped | ||
environment: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: ${MYSQL_DB_NAME} | ||
MYSQL_USER: ${MYSQL_USER} | ||
MYSQL_PASSWORD: ${MYSQL_PASSWORD} | ||
volumes: | ||
- ./data/dbmsql5:/var/lib/mysql | ||
|
||
|
||
# docker compose up -d --no-deps --build dbpsql | ||
# http://127.0.0.1:8000/?pgsql=dbpsql&username=local | ||
dbpsql: | ||
image: postgres | ||
restart: unless-stopped | ||
# set shared memory limit when using docker-compose | ||
shm_size: 128mb | ||
# or set shared memory limit when deploy via swarm stack | ||
volumes: | ||
# - ../2. Init Database:/docker-entrypoint-initdb.d | ||
- ./data/dbpsql:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_DB: local | ||
POSTGRES_USER: local | ||
POSTGRES_PASSWORD: local | ||
PGDATA: "/var/lib/postgresql/data/pgdata" | ||
|
||
redis: | ||
image: redis | ||
container_name: cache | ||
expose: | ||
- 6379 | ||
|
||
|
||
# networks: | ||
# internal: | ||
# driver: bridge | ||
# default: | ||
# external: true | ||
# name: scoobydoo | ||
|
||
|
||
|
||
# # http://127.0.0.1:8003 | ||
# # docker compose up -d --no-deps --build wp | ||
# wp: | ||
# image: wordpress | ||
# depends_on: | ||
# - dbmsql | ||
# # networks: | ||
# # - internal | ||
# ports: | ||
# - "8003:80" | ||
# environment: | ||
# WORDPRESS_DB_HOST: dbmsql:3306 | ||
# WORDPRESS_DB_NAME: ${MYSQL_DB_NAME} | ||
# WORDPRESS_DB_USER: ${MYSQL_USER} | ||
# WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD} | ||
# volumes: | ||
# - ./wp:/var/www/html/wp-content | ||
|
||
|
||
# http://127.0.0.1:81 | ||
# doc https://nginxproxymanager.com/ | ||
# docker compose exec app bash | ||
# docker compose up -d --no-deps --build app | ||
# app: | ||
# image: jc21/nginx-proxy-manager:latest | ||
# restart: unless-stopped | ||
# ports: | ||
# # - '80:80' | ||
# - '81:81' | ||
# - '443:443' | ||
# volumes: | ||
# - ./data/proxy:/data | ||
# - ./letsencrypt:/etc/letsencrypt |
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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
FROM ubuntu:jammy | ||
|
||
RUN \ | ||
apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
gnupg \ | ||
curl \ | ||
default-mysql-client \ | ||
dirmngr \ | ||
git \ | ||
gpg \ | ||
gpg-agent \ | ||
make \ | ||
openssh-client \ | ||
rsync \ | ||
software-properties-common \ | ||
tini \ | ||
unzip \ | ||
vim \ | ||
xz-utils \ | ||
zip \ | ||
zsh \ | ||
&& apt-get autoremove -y --purge \ | ||
&& apt-get autoclean -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/cache/debconf/*-old \ | ||
&& rm -rf /usr/share/doc/* \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /var/cache/apt/* | ||
|
||
|
||
ARG PHP_VERSION=8.2 | ||
RUN \ | ||
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
php-pear \ | ||
php${PHP_VERSION}-cli \ | ||
php${PHP_VERSION}-common \ | ||
php${PHP_VERSION}-curl \ | ||
php${PHP_VERSION}-mbstring \ | ||
php${PHP_VERSION}-mysql \ | ||
php${PHP_VERSION}-sqlite3 \ | ||
php${PHP_VERSION}-xml \ | ||
php${PHP_VERSION}-zip \ | ||
&& apt-get autoremove -y --purge \ | ||
&& apt-get autoclean -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/cache/debconf/*-old \ | ||
&& rm -rf /usr/share/doc/* \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /var/cache/apt/* | ||
|
||
|
||
# https://getcomposer.org/download/ | ||
# latest-stable will be replaced by a version number for PHP 7.1 | ||
ARG COMPOSER_VERSION="latest-stable" | ||
ADD --chmod=755 \ | ||
https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar \ | ||
/usr/local/bin/composer | ||
|
||
|
||
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope | ||
ARG TARGETARCH | ||
|
||
# Install node, npm and yarn | ||
ARG NODE_VERSION="v20.12.2" | ||
RUN \ | ||
if [ "${TARGETARCH}" = "amd64" ]; then \ | ||
ARCHITECTURE=x64; \ | ||
elif [ "${TARGETARCH}" = "arm" ]; then \ | ||
ARCHITECTURE=armv7l; \ | ||
elif [ "${TARGETARCH}" = "arm64" ]; then \ | ||
ARCHITECTURE=arm64; \ | ||
else \ | ||
echo "Unknown TARGETARCH: '${TARGETARCH}'";\ | ||
exit 1; \ | ||
fi \ | ||
&& curl -L "https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-${ARCHITECTURE}.tar.xz" \ | ||
--output node.tar.xz \ | ||
&& tar xJf node.tar.xz -C /usr --strip-components=1 --no-same-owner \ | ||
&& rm node.tar.xz \ | ||
&& npm i -g yarn | ||
|
||
WORKDIR /app | ||
|
||
CMD ["tail", "-f", "/dev/null"] |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM joseluisq/php-fpm:8.2 | ||
|
||
RUN rm /usr/local/etc/php/conf.d/docker-php-ext-psr.ini | ||
|
||
WORKDIR /app/ | ||
|
||
CMD [ "php", "-S", "[::]:80", "-t", "/app/public" ] | ||
|
||
EXPOSE 80 |