Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add CircleCI and ci docker images
- Loading branch information
Greg Guthe
committed
May 13, 2021
1 parent
c17d1d9
commit fc317cc
Showing
5 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
version: 2.1 | ||
|
||
workflows: | ||
test: | ||
jobs: | ||
- test | ||
|
||
jobs: | ||
test: | ||
docker: | ||
- image: node:12 | ||
# auth: | ||
# username: $DOCKER_USER | ||
# password: $DOCKER_PASS | ||
# working_directory: ~/ | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install curl and git | ||
command: | | ||
apt-get update -y && apt-get install -y curl git | ||
- run: | ||
name: Install Docker | ||
command: | | ||
apt-get install -y apt-transport-https ca-certificates gnupg lsb-release | ||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | ||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ | ||
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
apt-get update -y && apt-get install -y docker-ce docker-ce-cli containerd.io | ||
- run: | ||
name: Install Docker Compose | ||
command: | | ||
curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m) > ~/docker-compose | ||
chmod +x ~/docker-compose | ||
mv ~/docker-compose /usr/local/bin/docker-compose | ||
- setup_remote_docker | ||
- run: | ||
name: build web-ci and test-ci | ||
command: | | ||
/usr/local/bin/docker-compose build web-ci test-ci | ||
- run: | ||
name: run web and cache with Docker Compose | ||
command: | | ||
/usr/local/bin/docker-compose up -d web-ci | ||
- run: | ||
name: install node deps | ||
command: npm ci | ||
- run: | ||
name: test | ||
command: /usr/local/bin/docker-compose run --rm test-ci |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
/\.* | ||
/node_modules | ||
/package-lock.json | ||
.git/ | ||
.gitignore | ||
.circleci/ | ||
.travis.yml | ||
|
||
node_modules/ | ||
Dockerfile | ||
docker-compose.yml | ||
|
||
coverage | ||
.nyc_output/ | ||
|
||
*.tgz |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:12-alpine | ||
|
||
COPY ./package.json /app/ | ||
COPY ./package-lock.json /app/ | ||
|
||
WORKDIR /app | ||
|
||
RUN npm ci | ||
ADD . /app/ | ||
|
||
CMD ["npm", "test"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM mozilla/iprepd | ||
|
||
COPY ./iprepd.yaml /app/iprepd.yaml | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["bin/iprepd"] |