Files
nexusphp/docker-compose.yml

165 lines
3.4 KiB
YAML
Raw Normal View History

2025-04-27 21:09:42 +07:00
services:
php:
build:
context: ./.docker/php
2025-04-28 20:21:32 +07:00
image: nexusphp_php
2025-04-27 21:09:42 +07:00
container_name: nexusphp-php
2025-04-28 20:21:32 +07:00
environment:
SERVICE_NAME: php
2025-04-27 21:09:42 +07:00
volumes:
- .:/var/www/html
- ${NP_BACKUP_EXPORT_PATH:-/tmp/nexusphp_backup}:${NP_BACKUP_EXPORT_PATH:-/tmp/nexusphp_backup}
2025-04-27 21:09:42 +07:00
depends_on:
- mysql
- redis
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
queue:
2025-04-28 20:21:32 +07:00
image: nexusphp_php
2025-04-27 21:09:42 +07:00
container_name: nexusphp-queue
2025-04-28 20:21:32 +07:00
environment:
SERVICE_NAME: queue
2025-04-27 21:09:42 +07:00
volumes:
- .:/var/www/html
depends_on:
- php
- redis
- mysql
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
restart: always
2025-04-27 21:09:42 +07:00
scheduler:
2025-04-28 20:21:32 +07:00
image: nexusphp_php
2025-04-27 21:09:42 +07:00
container_name: nexusphp-scheduler
2025-04-28 20:21:32 +07:00
environment:
SERVICE_NAME: scheduler
2025-04-27 21:09:42 +07:00
volumes:
- .:/var/www/html
- ${NP_BACKUP_EXPORT_PATH:-/tmp/nexusphp_backup}:${NP_BACKUP_EXPORT_PATH:-/tmp/nexusphp_backup}
2025-05-13 18:21:14 +07:00
depends_on:
- php
- redis
- mysql
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
restart: always
2025-05-13 18:27:40 +07:00
2025-05-13 18:21:14 +07:00
cleanup:
image: nexusphp_php
container_name: nexusphp-cleanup
environment:
SERVICE_NAME: cleanup
volumes:
- .:/var/www/html
2025-04-27 21:09:42 +07:00
depends_on:
- php
- redis
- mysql
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
restart: always
2025-04-27 21:09:42 +07:00
openresty:
build:
context: ./.docker/openresty
container_name: nexusphp-openresty
environment:
2025-04-28 21:33:02 +07:00
NP_DOMAIN: ${NP_DOMAIN:-localhost}
2025-10-21 00:11:43 +07:00
NP_PORT: ${NP_PORT:-80}
2025-04-27 21:09:42 +07:00
volumes:
- ./.docker/openresty/sites:/etc/nginx/conf.d/sites
- ./.docker/openresty/certs:/certs
- ./.docker/openresty/entrypoint.sh:/usr/local/bin/entrypoint.sh
2025-05-01 21:42:31 +07:00
- ./.docker/openresty/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
- ./.docker/openresty/lua:/usr/local/openresty/lua
2025-04-27 21:09:42 +07:00
- .:/var/www/html
depends_on:
- php
- phpmyadmin
command: ["/bin/sh", "/usr/local/bin/entrypoint.sh"]
2025-04-28 20:21:32 +07:00
ports:
2025-04-29 01:24:13 +07:00
- "${NP_PORT:-80}:${NP_PORT:-80}"
2025-04-27 21:09:42 +07:00
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
redis:
image: redis:alpine
container_name: nexusphp-redis
command: redis-server
volumes:
- redis-data:/data
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
mysql:
image: mysql:9
container_name: nexusphp-mysql
environment:
2025-10-20 17:36:30 +07:00
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root}
MYSQL_DATABASE: ${DB_DATABASE:-nexusphp}
MYSQL_USER: ${DB_USERNAME:-nexusphp}
MYSQL_PASSWORD: ${DB_PASSWORD:-nexusphp}
2025-04-27 21:09:42 +07:00
volumes:
- mysql-data:/var/lib/mysql
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: nexusphp-phpmyadmin
environment:
PMA_HOST: mysql
depends_on:
- mysql
logging:
driver: "json-file"
options:
max-size: "1024m"
max-file: "3"
networks:
- appnet
volumes:
mysql-data:
redis-data:
networks:
appnet: