-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.phorge
More file actions
42 lines (30 loc) · 1.45 KB
/
Dockerfile.phorge
File metadata and controls
42 lines (30 loc) · 1.45 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
# Use PHP 8.1 with Apache (matches guide's PHP 8.0+ requirement)
FROM php:8.1-apache
WORKDIR /app
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN install-php-extensions mbstring iconv mysqli curl pcntl gd zip apcu opcache
RUN apt update && apt install -y git default-mysql-client python3-pygments
# Enable Apache modules
RUN a2enmod rewrite
# Clone Phorge and Arcanist from GitHub mirrors (per guide)
RUN git clone https://github.com/phorgeit/phorge.git
RUN git clone https://github.com/phorgeit/arcanist.git
RUN git config --system --add safe.directory /app/phorge
RUN git config --system --add safe.directory /app/arcanist
# Set up Apache and PHP for Phorge
COPY phorge/phorge.conf /etc/apache2/conf-enabled/phorge.conf
COPY phorge/phorge.ini /usr/local/etc/php/conf.d/phorge.ini
# Copy and set up entrypoint script
COPY phorge/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Copy initialization scripts (main + lib modules)
COPY phorge/init-phorge.sh /usr/local/bin/init-phorge.sh
COPY phorge/lib/ /usr/local/bin/lib/
RUN chmod +x /usr/local/bin/* /usr/local/bin/lib/*
# Create configuration directory and storage directories
RUN mkdir -p /app/phorge/conf/local /app/repo /app/files && \
chown -R www-data:www-data /app/phorge /app/repo /app/files
# Expose port 80
EXPOSE 80
# Entry point
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]