mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
Updated
This commit is contained in:
parent
dc6ae4a1cb
commit
f7c65a24b0
3 changed files with 27 additions and 9 deletions
13
Dockerfile
13
Dockerfile
|
@ -2,6 +2,7 @@ FROM dunglas/frankenphp:1-php8.4
|
|||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cron \
|
||||
supervisor \
|
||||
libicu-dev \
|
||||
libtidy-dev \
|
||||
libjpeg-dev \
|
||||
|
@ -18,18 +19,20 @@ RUN apt-get update && apt-get install -y \
|
|||
tidy \
|
||||
xml \
|
||||
xmlwriter \
|
||||
zip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
RUN echo "*/10 * * * * php /app/cron.php >> /var/log/cron.log 2>&1" > /etc/cron.d/app-cron \
|
||||
RUN echo "*/10 * * * * php /app/cron.php >> /proc/1/fd/1 2>&1" > /etc/cron.d/app-cron \
|
||||
&& chmod 0644 /etc/cron.d/app-cron \
|
||||
&& crontab /etc/cron.d/app-cron \
|
||||
&& touch /var/log/cron.log
|
||||
&& crontab /etc/cron.d/app-cron
|
||||
|
||||
COPY install/Caddyfile /etc/caddy/Caddyfile
|
||||
COPY install/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
EXPOSE 80 443
|
||||
EXPOSE 80
|
||||
# EXPOSE 80 443
|
||||
|
||||
CMD service cron start && frankenphp run --config /etc/caddy/Caddyfile
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
|
|
|
@ -6,11 +6,10 @@ services:
|
|||
container_name: torrentpier-app
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
# - "443:443"
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./:/app
|
||||
- ./internal_data:/app/internal_data
|
||||
- ./data:/app/data
|
||||
- ./sitemap:/app/sitemap
|
||||
|
@ -30,8 +29,6 @@ services:
|
|||
MYSQL_DATABASE: ${DB_DATABASE}
|
||||
MYSQL_USER: ${DB_USERNAME}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||
ports:
|
||||
- "${DB_PORT}:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
- ./install/mysql.sql:/docker-entrypoint-initdb.d/mysql.sql:ro
|
||||
|
|
18
install/supervisord.conf
Normal file
18
install/supervisord.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
|
||||
[program:cron]
|
||||
command=cron -f
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/cron.err.log
|
||||
stdout_logfile=/var/log/cron.out.log
|
||||
|
||||
[program:frankenphp]
|
||||
command=frankenphp run --config /etc/caddy/Caddyfile
|
||||
directory=/app
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/frankenphp.err.log
|
||||
stdout_logfile=/var/log/frankenphp.out.log
|
Loading…
Add table
Add a link
Reference in a new issue