You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
rucciva noneedtoknow 386a834eb3 update dockerfile 1 year ago
config drop priviledge 1 year ago
misc/docker update dockerfile 1 year ago
public initial commit 2 years ago
views initial commit 2 years ago
.dockerignore modify docker ignore 1 year ago
.gitignore initial commit 2 years ago
Readme.MD initial commit 2 years ago
app.js initial commit 2 years ago
package-lock.json - revert back using npm install; 1 year ago
package.json - revert back using npm install; 1 year ago
yarn.lock initial commit 2 years ago

Readme.MD

NodeJS Docker development template

Utilize Docker multi-stage builds and pkg to achieve small final docker image

Development

  1. Get into docker-compose development folder:

    cd ./misc/docker/development
    
  2. For each build -> run cycle, execute this command:

    docker-compose exec \
       app \
       sh -c \
       'yarn && pkg . -t ${PKG_NODE_ARCH} --output ./bin/app && ./bin/app'
    

Production

  1. Get into docker-compose production folder:

    cd ./misc/docker/production
    
  2. Build and run

    docker-compose up -d --build && docker-compose logs -f