forked from ampache/ampache-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
58 lines (44 loc) · 1.83 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM dramaturg/debian-systemd
MAINTAINER Sebastian Krohn <[email protected]>
# Need this environment variable otherwise mysql will prompt for passwords
RUN apt-get -y install \
nginx wget php7.1 php7.1-cli php7.1-fpm php7.1-json php7.1-curl php7.1-mysqlnd php7.1-gd \
php7.1-xml php7.1-readline pwgen lame libvorbis-dev vorbis-tools flac libmp3lame-dev \
libavcodec-extra* libfaac-dev libtheora-dev libvpx-dev libav-tools git inotify-tools && \
systemctl enable nginx
# Install composer for dependency management
RUN php -r "readfile('https://getcomposer.org/installer');" | php && \
mv composer.phar /usr/local/bin/composer
# For local testing / faster builds
# COPY master.tar.gz /opt/master.tar.gz
ADD https://github.com/ampache/ampache/archive/master.tar.gz /opt/ampache-master.tar.gz
# extraction / installation
RUN rm -rf /var/www/* && \
tar -C /var/www -xf /opt/ampache-master.tar.gz ampache-master --strip=1 && \
cd /var/www && composer install --prefer-source --no-interaction && \
chown -R www-data /var/www
ADD ampache.cfg.php /var/www/config/ampache.cfg.php
ENV conff_ampache /var/www/config/ampache.cfg.php
ENV DB_HOST mysql
ENV DB_PORT 3306
ENV DB_USER ampache
ENV DB_PASS changeme
ENV DB_NAME ampache
ENV MAIL_NAME "Ampache"
ENV MAIL_USER "sound"
ENV MAIL_DOMAIN "example.org"
ENV MAIL_PORT 25
ENV MAIL_HOST localhost
ENV MAIL_AUTH "false"
ENV MAIL_AUTHUSER change
ENV MAIL_AUTHPASS changeme
# setup nginx
ADD 001-ampache.conf /etc/nginx/sites-available/
RUN rm -f /etc/nginx/sites-enabled/default && \
ln -s /etc/nginx/sites-available/001-ampache.conf /etc/nginx/sites-enabled/
# Add job to cron to clean the library every night
RUN echo '30 7 * * * www-data php /var/www/bin/catalog_update.inc' >> /etc/crontab
VOLUME ["/media"]
VOLUME ["/var/www/config"]
VOLUME ["/var/www/themes"]
EXPOSE 80