Skip to content

Commit

Permalink
Update docker file to use published image if desired. Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Gessner authored and Jason Gessner committed Sep 29, 2024
1 parent fc73178 commit 79e3e4d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Dockerfile.deploy
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM python:3.11.4-bookworm AS build

# RUN apt-cache policy
RUN apt-get clean
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 .
ADD ./requirements.txt .
RUN pip install -r requirements.txt

WORKDIR /workdir
COPY ../ /workdir
COPY ./ /workdir

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

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,12 @@ Highlight a piece of text as new.
```
text: This is old text. {n}This is new text.{/n}
```

## Deployment

For local development, simply run `docker compose build` and `docker compose up -d`.

For production deployment, do the following, after a successful `docker login registry.digitalocean.com`:

* `docker compose pull`
* `docker compose up -d`
15 changes: 15 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
# service configuration for our dockerized Rails app
web:
environment:
VIRTUAL_HOST: rules.nullsignal.games
VIRTUAL_PORT: 80
LETSENCRYPT_HOST: rules.nullsignal.games
LETSENCRYPT_EMAIL: [email protected]

networks:
- null_signal

networks:
null_signal:
external: true
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
version: "3.2"

services:
rules:
restart: none
restart: no
image: registry.digitalocean.com/nsgcr/netrunner-comprehensive-rules:${RULES_IMAGE_VERSION:-latest}
# use the Dockerfile next to this file
# TODO(plural): Switch to the container image.
build:
dockerfile: Dockerfile.deploy

volumes:
- rules:/var/www/html

web:
restart: unless-stopped
image: php:8.2-cli-alpine

ports:
- "8999:80"

volumes:
- rules:/var/www/html

Expand Down

0 comments on commit 79e3e4d

Please sign in to comment.