File size: 1,557 Bytes
2c0e326
84f9516
2c0e326
 
84f9516
d40e16c
 
 
09055b1
 
 
642e8bd
2c0e326
642e8bd
 
84f9516
d40e16c
c8618eb
 
57f74eb
 
 
7d57daa
 
 
d40e16c
2c0e326
965f314
 
1f2ea08
18d2fa8
 
a964a99
1f2ea08
18d2fa8
0d4498f
 
18d2fa8
 
 
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
FROM eltercera/docker-processmaker

# Expose HuggingFace default port
EXPOSE 7860

# Enable required Apache modules
RUN a2enmod expires headers rewrite

# Set ServerName to suppress warning
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf

# Configure Apache to listen on port 7860 and set correct DocumentRoot
RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf && \
    sed -i 's/:80>/:7860>/' /etc/apache2/sites-available/000-default.conf && \
    sed -i 's|DocumentRoot /opt/pm/processmaker/workflow/public_html|DocumentRoot /opt/pm/processmaker/workflow/public_html/workflow/public_html|' /etc/apache2/sites-available/000-default.conf

# Create DocumentRoot if it doesn't exist
RUN mkdir -p /opt/pm/processmaker/workflow/public_html

# Extract and setup ProcessMaker
RUN cd /opt && \
    tar -xzf processmaker-3.2.3-community.tar.gz && \
    cp -r /opt/processmaker/* /opt/pm/processmaker/workflow/public_html/ && \
    chown -R www-data:www-data /opt/pm/processmaker/workflow/public_html && \
    chmod -R 755 /opt/pm/processmaker/workflow/public_html

# Set MySQL root password via environment
ENV MYSQL_ROOT_PASSWORD=PM-DBPassw0rd

# Create startup script (Apache only)
RUN echo '#!/bin/bash' > /start.sh && \
    echo 'set -e' >> /start.sh && \
    echo 'source /etc/apache2/envvars' >> /start.sh && \
    echo 'echo "Starting Apache on port 7860..."' >> /start.sh && \
    echo 'exec apache2 -D FOREGROUND' >> /start.sh && \
    chmod +x /start.sh

# Reset ENTRYPOINT and set CMD
ENTRYPOINT []
CMD ["/bin/bash", "/start.sh"]