Files
ols-docker-env/docker-compose.yml
T
Chyi b95f8c6299 Update docker-compose.yml
In the /bin/webadmin.sh file, CONT_NAME='litespeed' is used to check if the Litespeed docker container is running. 
https://github.com/litespeedtech/ols-docker-env/blob/d7b39ddeb46e454d413ce9e3fc80678384b0c8a2/bin/webadmin.sh#L2

Because the docker-compose file does not explicitly specify the container name for Litespeed, newcomers following the steps in the readme.md might encounter an error indicating that Litespeed is not running, which could be confusing. It is recommended to explicitly define a container name in the docker-compose example file that matches the hardcoded container name in the shell script.
2024-03-04 10:57:33 +08:00

66 lines
1.5 KiB
YAML

version: '3'
services:
mysql:
image: mariadb:10.5.9
logging:
driver: none
command: ["--max-allowed-packet=512M"]
volumes:
- "./data/db:/var/lib/mysql:delegated"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
restart: always
networks:
- default
litespeed:
image: litespeedtech/openlitespeed:${OLS_VERSION}-${PHP_VERSION}
container_name: litespeed
env_file:
- .env
volumes:
- ./lsws/conf:/usr/local/lsws/conf
- ./lsws/admin-conf:/usr/local/lsws/admin/conf
- ./bin/container:/usr/local/bin
- ./sites:/var/www/vhosts/
- ./acme:/root/.acme.sh/
- ./logs:/usr/local/lsws/logs/
ports:
- 80:80
- 443:443
- 443:443/udp
- 7080:7080
restart: always
environment:
TZ: ${TimeZone}
networks:
- default
phpmyadmin:
image: bitnami/phpmyadmin:5.2.0-debian-11-r43
ports:
- 8080:8080
- 8443:8443
environment:
DATABASE_HOST: mysql
restart: always
networks:
- default
redis:
image: "redis:alpine"
logging:
driver: none
# command: redis-server --requirepass 8b405f60665e48f795752e534d93b722
volumes:
- ./redis/data:/var/lib/redis
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
restart: always
networks:
- default
networks:
default:
driver: bridge