Upgrade to PHP 8.2 + add docker compose

This commit is contained in:
bohwaz 2023-09-04 23:05:30 +02:00
parent e944776863
commit ee7ca4c3ed
2 changed files with 12 additions and 3 deletions

View file

@ -2,7 +2,7 @@ FROM alpine:edge
LABEL Maintainer="BohwaZ <https://bohwaz.net/>" \
Description="KaraDAV file sharing server"
RUN apk --no-cache add php81 php81-curl php81-ctype php81-opcache php81-simplexml php81-session php81-sqlite3 php81-fileinfo
RUN apk --no-cache add php82 php82-curl php82-ctype php82-opcache php82-simplexml php82-session php82-sqlite3 php82-fileinfo
ENV PHP_CLI_SERVER_WORKERS=4
# Setup document root
@ -16,11 +16,10 @@ WORKDIR /var/karadav/
COPY lib /var/karadav/lib/
COPY www /var/karadav/www/
COPY schema.sql /var/karadav/
COPY config.dist.php /var/karadav/config.local.php
EXPOSE 8080
VOLUME ["/var/karadav/data"]
VOLUME ["/var/karadav/data", "/var/karadav/config.local.php"]
ENV PHP_CLI_SERVER_WORKERS=3
CMD ["php", "-S", "0.0.0.0:8080", "-t", "www", "www/_router.php"]

10
docker-compose.yml Normal file
View file

@ -0,0 +1,10 @@
version: '3'
services:
karadav:
container_name: karadav
build: .
volumes:
- ./data:/var/karadav/data
- ./config.local.php:/var/karadav/config.local.php
ports:
- "8080:8080"