Merge branch 'docker'
This commit is contained in:
commit
b9907a8021
|
@ -0,0 +1,5 @@
|
|||
/node_modules
|
||||
/static/feeds/*
|
||||
!/static/feeds/.gitkeep
|
||||
/static/alternate/*
|
||||
!/static/alternate/.gitkeep
|
|
@ -0,0 +1,21 @@
|
|||
FROM node:latest
|
||||
|
||||
WORKDIR /kill-the-newsletter
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --production
|
||||
COPY . .
|
||||
|
||||
VOLUME /kill-the-newsletter/static/feeds/
|
||||
VOLUME /kill-the-newsletter/static/alternate/
|
||||
|
||||
ENV WEB_PORT=8000
|
||||
ENV EMAIL_PORT=2525
|
||||
ENV BASE_URL=http://localhost:8000
|
||||
ENV EMAIL_DOMAIN=localhost
|
||||
ENV ISSUE_REPORT=mailto:kill-the-newsletter@leafac.com
|
||||
|
||||
EXPOSE 8000
|
||||
EXPOSE 2525
|
||||
|
||||
CMD npx ts-node .
|
13
README.md
13
README.md
|
@ -101,3 +101,16 @@ Install [Node.js](https://nodejs.org/) and run:
|
|||
```console
|
||||
$ npm install-test
|
||||
```
|
||||
|
||||
# Docker Support (Experimental)
|
||||
|
||||
Install [Docker](https://www.docker.com/) and run:
|
||||
|
||||
```console
|
||||
$ docker build -t kill-the-newsletter .
|
||||
$ docker run kill-the-newsletter
|
||||
```
|
||||
|
||||
The web server will be running at `http://localhost:8000` and the email server at `smtp://localhost:2525`.
|
||||
|
||||
For use in production, start with the example [`Dockerfile`](Dockerfile).
|
||||
|
|
Loading…
Reference in New Issue