Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Commit 6b3cc23

Browse files
authored
Merge pull request #1 from rexlManu/1.0_alpha1
Fixed docker file
2 parents aa8ee92 + ae12732 commit 6b3cc23

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
FROM php:8.0-apache
22

3-
COPY . usr/webinterface/
4-
WORKDIR usr/webinterface/
3+
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
54

5+
COPY . /var/www/html/
6+
WORKDIR /var/www/html/
7+
8+
# Building the application
69
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
10+
RUN apt-get update && apt-get install -y git
711
RUN composer install --no-dev
812

9-
USER www-data
13+
# Enabling ae2 rewrites
14+
RUN a2enmod rewrite
1015

11-
EXPOSE 80 443
12-
CMD ["apachectl", "-D", "FOREGROUND"]
16+
# Change document root
17+
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
18+
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

INSTALL.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,27 @@ Info: The web interface also works on an external Webspace!
6565
curl -sS https://getcomposer.org/installer | php
6666
php composer.phar install --no-dev -o
6767

68+
## Docker
69+
70+
For the docker setup you just need to have `docker` and `git` installed.
71+
72+
## Clone the repository
73+
``git clone https://github.com/The-Systems/CloudNet3-WebInterface.git``
74+
75+
## Build the docker image
76+
77+
``docker build -t cloudnet-webinterface .``
78+
79+
## Run the image
80+
81+
The interface will run on port 8080 on the host.
82+
83+
```bash
84+
docker run -d --name cloudnet-webinterface \
85+
--port 8080:80 \
86+
cloudnet-webinterface
87+
```
88+
6889
# GERMAN
6990

7091
## Vorraussetzungen

0 commit comments

Comments
 (0)