initial docker setup

This commit is contained in:
matt committed 2026-10-17 04:43:52 -07:00
1 parent 2e3e8d8514
commit 6776bf9726
8 files changed
+119 -5

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# Base image
FROM php:8.1-apache
# Install system packages
RUN apt-get update && apt-get install -y --no-install-recommends \
# Python
python3 python3-venv python3-pip \
# Process supervisor
supervisor \
# Others
net-tools curl \
# Clean up
&& rm -rf /var/lib/apt/lists/*
# Apache on 8069
COPY apache_ports.conf /etc/apache2/ports.conf
COPY apache_vhost.conf /etc/apache2/sites-available/000-default.conf
COPY web/ /var/www/html/
# API on 5000
RUN mkdir -p /opt/Fitness
RUN python3 -m venv /opt/Fitness/venv
# COPY apis/StorageSummary/requirements.txt /opt/Fitness/
RUN /opt/Fitness/venv/bin/pip3 install --no-cache-dir
# -r /opt/Fitness/requirements.txt
# Copy the actual app code after installing deps
COPY api/ /opt/Fitness/
# Add supervisord configuration
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose ports
EXPOSE 8069
# healthcheck looks for apache
HEALTHCHECK CMD netstat -ltn | grep -c ":8069" > /dev/null; if [ 0 != $? ]; then exit 1; fi;
# Start supervisord
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]