Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
23 changes: 23 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.1.10-node-browsers
steps:
- checkout
- setup_remote_docker
# Base64 decode our config
- run: echo $CWB_ENV | base64 --decode >> .env
- run: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWD
make compose-build
docker push mmmanyfold/cfd:latest
workflows:
version: 2
build_and_deploy:
jobs:
- build:
filters:
branches:
only:
- feat-circle
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ CWBN_STAGE_REPO_URL = mmmanyfold/cfd:$(TAG)
ELASTIC_SEARCH_IMAGE = docker.elastic.co/elasticsearch/elasticsearch:6.4.1
REDIS_IMAGE = redis:5.0.0-alpine

.PHONY: compose-build
compose-build:
@docker-compose build --no-cache

.PHONY: build
build:
@docker build --build-arg CWBN_AIRTABLE_API_KEY=$(CWBN_AIRTABLE_API_KEY) -t $(IMAGE) .
Expand Down Expand Up @@ -48,3 +52,9 @@ swarn: .droplet-remote
redis:
docker pull $(REDIS_IMAGE)
docker run -v redis.conf:/usr/local/etc/redis/redis.conf -p 6379:6379 $(REDIS_IMAGE) /usr/local/etc/redis/redis.conf

watchtower:
docker run -d --rm \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
v2tec/watchtower cwbn_web
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
depends_on:
- redis
- elasticsearch
image: index.docker.io/mmmanyfold/cfd:latest
redis:
image: "redis:alpine"
environment:
Expand All @@ -16,3 +17,11 @@ services:
- "6379:6379"
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:6.4.1"
watchtower:
image: v2tec/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/.docker/config.json:/config.json
command: --interval 30 --debug
restart: unless-stopped