mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-08-23 14:34:50 +00:00
add new DockerFile and docker-compose example
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
FROM php:7.4-fpm
|
||||
EXPOSE 9000
|
||||
WORKDIR /var/www
|
||||
FROM composer:1.10.9
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV cron="0 */1 * * *"
|
||||
|
||||
COPY . /IYUU
|
||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
|
||||
WORKDIR /IYUU
|
||||
|
||||
RUN apk add --no-cache bash tzdata \
|
||||
&& composer i
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
11
docker/docker-compose.yaml
Normal file
11
docker/docker-compose.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: "2.3"
|
||||
services:
|
||||
app:
|
||||
image: hxsf/iyuuautoreseed
|
||||
network_mode: host
|
||||
environment:
|
||||
- cron=0 * * * *
|
||||
volumes:
|
||||
- ./config:/IYUU/config
|
||||
- ./torrent:/IYUU/torrent
|
||||
restart: always
|
10
docker/entrypoint.sh
Executable file
10
docker/entrypoint.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
DEFAULT_CRON="0 */1 * * *"
|
||||
cron=${cron:-$DEFAULT_CRON}
|
||||
set -e
|
||||
|
||||
echo "$cron /usr/local/bin/php /IYUU/iyuu.php" | crontab -
|
||||
|
||||
/usr/local/bin/php /IYUU/iyuu.php
|
||||
|
||||
/usr/sbin/crond -f
|
Reference in New Issue
Block a user