Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

Use Alpine Linux #64

Merged
merged 6 commits into from
Dec 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
| `npm run clean` | Remove the `node_modules` directory from all packages |
| `npm run generate` | Generate example honeycomb services (`packages/example-*`) |

### Docker

| Command | Description |
| --------|-------------|
| `npm run docker:build` | Build the dist version for `packages/honeycomb-layout` and `packages/example-*` |
| `docker-compose up` | Create and start containers |

## License

Copyright (c) 2016 Daniel Bayerlein. See [LICENSE](./LICENSE.md) for details.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"clean": "lerna clean",
"docker:build": "lerna run build --scope '@(honeycomb-layout|example-*)'",
"test": "lerna run test --scope *honeycomb*",
"postinstall": "lerna bootstrap --scope *honeycomb*",
"generate": "node scripts/generate-examples.js && lerna bootstrap",
Expand Down
12 changes: 8 additions & 4 deletions packages/generator-honeycomb/app/templates/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
coverage
logs
node_modules
pids
dist
src
test
.babelrc
.dockerignore
.DS_Store
.eslintignore
.eslintrc.yml
.stylelintrc.yml
npm-debug.log
Dockerfile
.dockerignore
16 changes: 9 additions & 7 deletions packages/generator-honeycomb/app/templates/_Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM node:latest
FROM node:alpine

# Install Yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
RUN apk add --no-cache --virtual .build-deps tar curl bash gnupg \
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
&& apk del .build-deps
ENV PATH /root/.yarn/bin:$PATH

# Create app directory
Expand All @@ -13,16 +15,16 @@ ENV NODE_ENV production

# Install app dependencies
COPY package.json /code/<%= dir %>/
RUN yarn --pure-lockfile
RUN apk add --no-cache --virtual .app-deps python make g++ \
&& yarn --pure-lockfile \
&& yarn cache clean \
&& apk del .app-deps

# Bundle app source
COPY . /code/<%= dir %>

# Build
RUN yarn run build

# Port
EXPOSE <%= port %>

# Start
CMD [ "npm", "start" ]
CMD [ "yarn", "start" ]
12 changes: 8 additions & 4 deletions packages/honeycomb-layout/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
__tests__
coverage
logs
node_modules
pids
dist
src
.babelrc
.dockerignore
.DS_Store
.eslintignore
.eslintrc.yml
npm-debug.log
Dockerfile
.dockerignore
README.md
18 changes: 10 additions & 8 deletions packages/honeycomb-layout/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM node:latest
FROM node:alpine

# Install Yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
RUN apk add --no-cache --virtual .build-deps tar curl bash gnupg \
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
&& apk del .build-deps
ENV PATH /root/.yarn/bin:$PATH

# Create app directory
Expand All @@ -12,17 +14,17 @@ WORKDIR /code/honeycomb-layout
ENV NODE_ENV production

# Install app dependencies
COPY package.json /code/honeycomb-layout
RUN yarn --pure-lockfile
COPY package.json /code/honeycomb-layout/
RUN apk add --no-cache --virtual .app-deps python make g++ \
&& yarn --pure-lockfile \
&& yarn cache clean \
&& apk del .app-deps

# Bundle app source
COPY . /code/honeycomb-layout

# Build
RUN yarn run build

# Port
EXPOSE 3000

# Start
CMD [ "npm", "start" ]
CMD [ "yarn", "start" ]