kenken999 commited on
Commit
2c0e326
·
verified ·
1 Parent(s): d9ce4d1

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -45
Dockerfile CHANGED
@@ -1,50 +1,15 @@
1
- FROM ubuntu:20.04
2
 
3
- # Prevent interactive prompts during installation
4
- ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # Install MySQL 5.6 and Apache/PHP dependencies
7
- RUN apt-get update && \
8
- apt-get install -y \
9
- mysql-server-5.7 \
10
- apache2 \
11
- php \
12
- php-mysql \
13
- php-gd \
14
- php-curl \
15
- php-xml \
16
- php-mbstring \
17
- wget \
18
- unzip \
19
- supervisor && \
20
- apt-get clean && \
21
- rm -rf /var/lib/apt/lists/*
22
 
23
- # MySQL configuration
24
  ENV MYSQL_ROOT_PASSWORD=PM-DBPassw0rd
25
- RUN service mysql start && \
26
- mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}';" && \
27
- mysql -u root -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS wf_workflow;" && \
28
- mysql -u root -p${MYSQL_ROOT_PASSWORD} -e "FLUSH PRIVILEGES;"
29
-
30
- # Download and install ProcessMaker (community edition)
31
- WORKDIR /var/www/html
32
- RUN wget https://github.com/ProcessMaker/processmaker/archive/refs/heads/master.zip -O processmaker.zip && \
33
- unzip processmaker.zip && \
34
- mv processmaker-master processmaker && \
35
- rm processmaker.zip && \
36
- chown -R www-data:www-data /var/www/html/processmaker
37
-
38
- # Configure Apache
39
- RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
40
- a2enmod rewrite
41
-
42
- # Expose port 7860 (HuggingFace default)
43
- EXPOSE 7860
44
-
45
- # Create supervisor configuration
46
- RUN mkdir -p /var/log/supervisor
47
- COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
48
 
49
- # Start services with supervisor
50
- CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
 
 
1
+ FROM eltercera/docker-processmaker
2
 
3
+ # Expose HuggingFace default port
4
+ EXPOSE 7860
5
 
6
+ # Configure Apache to listen on port 7860
7
+ RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf && \
8
+ sed -i 's/:80>/:7860>/' /etc/apache2/sites-available/000-default.conf
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
+ # Set MySQL root password via environment
11
  ENV MYSQL_ROOT_PASSWORD=PM-DBPassw0rd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ # Start MySQL and Apache
14
+ CMD service mysql start && \
15
+ /usr/sbin/apache2ctl -D FOREGROUND