-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (27 loc) · 978 Bytes
/
Dockerfile
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
FROM php:8.3-apache-bullseye
RUN apt-get update && apt-get install --no-install-recommends -y python3 python3-dev python3-venv python3-pip python3-wheel build-essential supervisor nano procps screen && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Create and activate virtual environment
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Install requirements
COPY /requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Make dir for app and config
RUN mkdir /config/ && \
chown www-data /config/ && \
chmod 700 /config/ && \
mkdir /app/ && \
chown www-data /app/ && \
chmod 700 /app/
# Set work directory
WORKDIR /app/
# Copy Code
COPY /src/app/* /app/
# Deploy Code
RUN bash /app/deploy.sh && rm /app/deploy.sh
# Permissions
RUN chmod 755 /app/app.sh /app/f1wled.py /app/cmd.sh
COPY supervisord.conf /etc/supervisor/conf.d/
#COPY ./web /var/www/html
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]