Browse Source

add docker instructions (#87)

pull/88/head
Cian Butler 4 years ago
committed by GitHub
parent
commit
fb9df9166e
3 changed files with 33 additions and 3 deletions
  1. +8
    -0
      README.md
  2. +22
    -0
      docker-compose.yml
  3. +3
    -3
      package.json

+ 8
- 0
README.md View File

@@ -11,6 +11,9 @@ git clone https://github.com/redbrick/techweek.git
cd techweek
npm install

### Docker
```
docker-compose up install
```

## How it works
@@ -31,6 +34,11 @@ Gulp concats this with materilize and minifies it to `dist/js`
* When running the files locally, run it using a web server or you will have problems with Same-origin policy. _no longer true as site is regenerated_
A simple solution is to run `gulp dev` which will compile the less, watch it and start a webserver at techweek.dev:8000

### Docker
```
docker-compose up install
docker-compose up dev
```
### CSS
All the css is compiled from less in the less directory.
Run `gulp dev` to have gulp watch the less directory and compile all the less in to `dist/css`.


+ 22
- 0
docker-compose.yml View File

@@ -0,0 +1,22 @@
version: "3"

services:
install:
image: node:boron
container_name: techweek-install
command: npm install --unsafe-perm
working_dir: /usr/src/app
volumes:
- $PWD:/usr/src/app

dev:
image: node:boron
container_name: techweek-server
command: npm run dev
working_dir: /usr/src/app
tty: true
ports:
- "8000:8000"
- "35729:35729"
volumes:
- $PWD:/usr/src/app

+ 3
- 3
package.json View File

@@ -5,10 +5,10 @@
"main": "gulpfile.js",
"scripts": {
"test": "eslint js/* bin/* && node bin/checkEventJson.js && gulp",
"dev": "gulp dev",
"postinstall": "gulp",
"dev": "npm run build dev",
"postinstall": "node node_modules/gulp/bin/gulp.js",
"lint": "eslint .",
"build": "gulp",
"build": "node node_modules/gulp/bin/gulp.js",
"fix": "eslint . --fix"
},
"repository": {


Loading…
Cancel
Save