Skip to content

Commit

Permalink
Make tiny image for rules + web server.
Browse files Browse the repository at this point in the history
  • Loading branch information
plural committed Mar 29, 2024
1 parent 954069a commit 1c8979f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Dockerfile.deploy
@@ -0,0 +1,25 @@
FROM python:3.11.4-bookworm AS build

RUN apt-get update
RUN apt-get -y install texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-fonts-extra latexmk
RUN apt-get -y install php-cli php-dom

ADD ../requirements.txt .
RUN pip install -r requirements.txt

WORKDIR /workdir
COPY ../ /workdir

RUN python3 -m rules_doc_generator -a -t all -m 03 -d 30 -y 2024

ENTRYPOINT /bin/sh

FROM php:8.2-cli-alpine AS final

COPY --from=build /workdir/php/* /var/www/html/

EXPOSE 80

WORKDIR /var/www/html

CMD ["php", "-S", "0.0.0.0:80"]
13 changes: 13 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,13 @@
version: "3.2"

services:
rules:

# use the Dockerfile next to this file
# TODO(plural): Switch to the container image.
build:
dockerfile: Dockerfile.deploy

ports:
- "8999:80"

0 comments on commit 1c8979f

Please sign in to comment.