-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (37 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
45 lines (37 loc) · 1.28 KB
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
# Info
FROM debian:8.2
MAINTAINER Nikolas Tsiongas <ntsiongas@gmail.com>
LABEL Description="Flarum forum easy deployment" Vendor="echo511" Version="1.0"
# System
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \
apt-get install -q -y curl \
git \
libcurl3\
mysql-server \
nginx \
openssl \
php5 \
php5-curl \
php5-fpm \
php5-gd \
php5-mysql \
\
&& \
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/bin/composer
# Flarum
RUN composer create-project flarum/flarum /var/www/flarum --stability=beta && chown www-data:www-data -R /var/www/flarum && chmod 777 -R /var/www/flarum
# Nginx
RUN rm -rf /etc/nginx/sites-enabled/*
ADD nginx-flarum.conf /etc/nginx/sites-enabled/flarum.conf
# MySQL
RUN service mysql start && mysql -u root -e 'create database flarum'
# Init script
ADD run-flarum.sh /run-flarum.sh
RUN chmod +x /run-flarum.sh
# Persistence
VOLUME ["/var/lib/mysql", "/var/www/flarum"]
# Ports
EXPOSE 80
# Run
CMD /run-flarum.sh