Browse Source

integration with docker

User may avoid local setup issues using docker. All you need to have
docker and docker compose
it relies on node:8-jessie image.
pull/110/head
sid 7 years ago
parent
commit
5397f76747
5 changed files with 28 additions and 0 deletions
  1. +2
    -0
      Dockerfile
  2. +8
    -0
      README.md
  3. +13
    -0
      docker-compose.yaml
  4. +4
    -0
      init.sh
  5. +1
    -0
      package.json

+ 2
- 0
Dockerfile View File

@ -0,0 +1,2 @@
FROM node:8-jessie
RUN npm rebuild node-sass

+ 8
- 0
README.md View File

@ -39,6 +39,14 @@ Start by typing the following commands in your terminal in order to get **Admina
> npm run dev
```
#### Running with Docker
```
> git clone https://github.com/puikinsh/Adminator-admin-dashboard.git adminator
> cd adminator
> docker-compose up --build
```
browse [http://localhost:3000/](http://localhost:3000/) , we are good to go
### Files/Folders Structure
Here is a brief explanation of the template folder structure and some of its main files usage:


+ 13
- 0
docker-compose.yaml View File

@ -0,0 +1,13 @@
version: '3'
services:
ui:
build:
context: .
dockerfile: Dockerfile
command: "sh init.sh"
working_dir: /home/node/app
volumes:
- ${PWD}/:/home/node/app
container_name: ui
ports:
- 3000:3000

+ 4
- 0
init.sh View File

@ -0,0 +1,4 @@
#!/bin/bash
git config --global url."https://".insteadOf git://
npm install
npm run docker-dev

+ 1
- 0
package.json View File

@ -6,6 +6,7 @@
"scripts": {
"start": "webpack-dev-server",
"dev": "webpack-dashboard -t 'Project' -- webpack-dev-server",
"docker-dev": "webpack-dev-server",
"clean": "shx rm -rf ./build",
"build": "npm run clean && cross-env NODE_ENV=\"production\" webpack",
"preview": "cross-env NODE_ENV=\"production\" webpack-dev-server",


Loading…
Cancel
Save