Skip to content

Instantly share code, notes, and snippets.

@rhysforyou
Created February 1, 2018 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhysforyou/3ba1d08dda583f1cd75d7867843e830f to your computer and use it in GitHub Desktop.
Save rhysforyou/3ba1d08dda583f1cd75d7867843e830f to your computer and use it in GitHub Desktop.
Testing setup from Ticketek Web Payments
---
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
---
version: '2'
services:
app:
build: .
volumes:
- ./dist:/app/dist
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
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