File size: 987 Bytes
e82ad34
 
31ceefd
e82ad34
31ceefd
 
eda32b6
 
 
b620b0c
 
3674c10
eda32b6
 
 
 
2f93ae0
87abb41
 
 
2f93ae0
 
85e35c8
7050eac
b620b0c
d6315a0
31ceefd
b620b0c
0542040
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
# Use Microsoft's Playwright-ready Docker image with Python
FROM mcr.microsoft.com/playwright:focal

# Set the working directory in the container to /app
WORKDIR /app

# Install python3 and pip3
RUN apt-get update && apt-get install -y python3-pip
RUN python3 -m pip install --upgrade pip setuptools wheel

# Install Flask and Flask-RESTful
RUN pip3 install flask flask_restful

# Install playwright python package and the browsers
RUN pip3 install playwright
RUN playwright install

# Expose the secret GITHUB_TOKEN at buildtime and use its value in git clone command
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
    git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/UrloMythus/Mysterious.git /app || true

# Copy README.md from local (adjust path if needed)
COPY README.md /app/README.md

# Make port 8080 available to the world outside this container
EXPOSE 8080

# Run generator.py and flask run when the container launches
CMD ["python3", "app.py"]