Created
February 1, 2018 23:07
-
-
Save rhysforyou/3ba1d08dda583f1cd75d7867843e830f to your computer and use it in GitHub Desktop.
Testing setup from Ticketek Web Payments
This file contains hidden or 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
--- | |
env: | |
BUILDKITE_DOCKER_COMPOSE_CONTAINER: app | |
steps: | |
- label: ":jest: Run Tests" | |
command: npm test -- --no-watch --color --verbose | |
agents: | |
docker: '*' | |
queue: default | |
- label: ":eslint: Lint Code" | |
command: npm run lint | |
agents: | |
docker: '*' | |
queue: default | |
- label: ":flowtype: Type Check Code" | |
command: npm run flow | |
agents: | |
docker: '*' | |
queue: default | |
- "wait" | |
- label: ":s3: Deploy Staging Build" | |
env: | |
API_STAGE: staging | |
command: | |
- npm run build | |
- aws s3 sync --acl='public-read' --delete --include='*' --exclude='.well-known/*' dist/ s3://ticketek-web-payments-staging | |
artifact_paths: "dist/**/*" | |
branches: master | |
agents: | |
docker: '*' | |
queue: default |
This file contains hidden or 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
--- | |
version: '2' | |
services: | |
app: | |
build: . | |
volumes: | |
- ./dist:/app/dist | |
environment: | |
- AWS_ACCESS_KEY_ID | |
- AWS_SECRET_ACCESS_KEY | |
- AWS_DEFAULT_REGION |
This file contains hidden or 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 node | |
# Create app directory | |
RUN mkdir /app | |
WORKDIR /app | |
RUN apt-get update \ | |
&& apt-get install awscli -y | |
# Install app dependencies | |
COPY package.json package-lock.json /app/ | |
RUN npm install | |
# Copy app sources | |
COPY flow-typed/ /app/flow-typed | |
COPY src/ /app/src | |
COPY public/ /app/public | |
ADD .babelrc \ | |
.eslintrc.json \ | |
.flowconfig \ | |
webpack.config.js \ | |
webpack.config.prod.js \ | |
webpack.config.dev.js \ | |
buildkite* \ | |
./ | |
# Start the server | |
EXPOSE 3000 | |
CMD [ "npm", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment