add docker

This commit is contained in:
Jeff Groom
2019-09-24 18:52:25 -06:00
parent fdb9a351f4
commit 30ad96322d
4 changed files with 123 additions and 0 deletions

100
.dockerignore Normal file
View File

@@ -0,0 +1,100 @@
Dockerfile
.vscode
.github
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Service worker
sw.*
# Mac OSX
.DS_Store
# Vim swap files
*.swp
# Postwoman build data
.postwoman
# File explorer
.directory

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM node:12.10.0-buster
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "start"]

View File

@@ -152,7 +152,15 @@ You're done!
--- ---
## Docker
```bash
docker build -t postwoman:latest
docker run -p 3000:3000 postwoman:latest
```
## Releasing ## Releasing
1. [Clone this repo](https://help.github.com/en/articles/cloning-a-repository) with git. 1. [Clone this repo](https://help.github.com/en/articles/cloning-a-repository) with git.
1. Install dependencies by running `npm install` within the directory that you cloned (probably `postwoman`). 1. Install dependencies by running `npm install` within the directory that you cloned (probably `postwoman`).
1. Build the release files with `npm run build`. 1. Build the release files with `npm run build`.

View File

@@ -24,6 +24,9 @@ export default {
/* /*
** Headers of the page ** Headers of the page
*/ */
server: {
host: '0.0.0.0', // default: localhost
},
head: { head: {
title: `${meta.name} \u2022 ${meta.shortDescription}`, title: `${meta.name} \u2022 ${meta.shortDescription}`,
meta: [ meta: [