32 lines
835 B
Docker
32 lines
835 B
Docker
# ---------- Dockerfile ----------
|
|
# Base image - PHP + Apache
|
|
FROM php:apache
|
|
|
|
# Install Python, NGINX, Supervisor and pip
|
|
RUN apt-get update && apt-get install -y \
|
|
python3 \
|
|
python3-pip \
|
|
python3-flask \
|
|
python3-yaml \
|
|
nginx \
|
|
supervisor \
|
|
net-tools \
|
|
iputils-ping \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy your application code & config files
|
|
# Website Files
|
|
COPY www/ /var/www/html
|
|
# Python files
|
|
COPY api/ /usr/src/app/
|
|
# Config Files
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
COPY apache_ports.conf /etc/apache2/ports.conf
|
|
COPY apache_vhost.conf /etc/apache2/sites-available/000-default.conf
|
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
# Expose the ports you care about
|
|
EXPOSE 80 8080 5000
|
|
|
|
# Start Supervisor
|
|
CMD ["/usr/bin/supervisord", "-n"] |