Created
August 22, 2016 17:05
-
-
Save rafaelrinaldi/b915345cfd958ba3e3fafa6024e3e8b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder: | |
command: ['/tmp/run-no-version.sh'] | |
environment: | |
BUILD_NUMBER: $BUILD_NUMBER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
build: . | |
dockerfile: ./docker/Dockerfile-server | |
ports: | |
- '8080:80' | |
volumes_from: | |
- builder | |
builder: | |
build: . | |
dockerfile: ./docker/Dockerfile-ui | |
environment: | |
BUILD_NUMBER: $BUILD_NUMBER | |
volumes: | |
- .:/workdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx | |
MAINTAINER Rafael Rinaldi <rinaldi@work.co> | |
# Copy custom configuration file from the current directory | |
COPY nginx/nginx.conf /etc/nginx/nginx.conf | |
COPY nginx/mime.types /etc/nginx/mime.types | |
COPY nginx/.htpasswd /etc/nginx/.htpasswd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:wily | |
ENV NPM_CONFIG_LOGLEVEL info | |
ENV NODE_VERSION 4.2.1 | |
RUN apt-get -y update && apt-get install -y curl | |
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ | |
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | |
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" | |
MAINTAINER Rafael Rinaldi <rafael.rinaldi@work.co> | |
RUN npm i npm@3.7.1 -g | |
# Cache node modules | |
ADD package.json /tmp/package.json | |
ADD npm-shrinkwrap.json /tmp/npm-shrinkwrap.json | |
# Fresh install of node modules | |
RUN cd /tmp && npm i | |
RUN mkdir /workdir | |
RUN cp -a /tmp/node_modules /workdir | |
# Mount working directory | |
VOLUME /workdir | |
WORKDIR /workdir | |
# Copy custom scripts | |
COPY ./docker/scripts/ /tmp | |
# Set permissions | |
RUN cd /tmp && chmod 755 -R /tmp/ && ls -ltra | |
# Finally run the command | |
CMD /tmp/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
mkdir -p ../public | |
cp -a /tmp/node_modules . | |
npm i || cat npm-debug.log | |
npm run build || cat npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
├── CONTRIBUTING.md | |
├── docker | |
│ ├── Dockerfile-server | |
│ ├── Dockerfile-ui | |
│ └── scripts | |
├── docker-compose.qa.yml | |
├── docker-compose.yml | |
├── nginx | |
│ ├── mime.types | |
│ └── nginx.conf | |
├── npm-shrinkwrap.json | |
├── package.json | |
├── public | |
│ ├── bundle.ffb4a995ec90480919c5.css | |
│ ├── bundle.ffb4a995ec90480919c5.js | |
│ └── index.html | |
└── webpack.config.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment