handsome_fencer-circle_c_i 0.1.27 → 0.1.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/handsome_fencer/circle_c_i/templates/circleci/config.yml +17 -47
- data/lib/handsome_fencer/circle_c_i/templates/circleci/config.yml.workflow-example +62 -0
- data/lib/handsome_fencer/circle_c_i/templates/docker-compose.yml +4 -4
- data/lib/handsome_fencer/circle_c_i/version.rb +1 -1
- metadata +3 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc930517fb1fc9626fdcf832e02c73d2428246c6e52ef6e34cbf51c398c6b409
|
4
|
+
data.tar.gz: ec1a10710cf37e6ee66ca118ceb5703373a23439688f3637917fc1c781a01c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a07ef7638a2adab5cc7e191bf3b7cfaa7c01b5dcc51eeef645c35550f78b54fe542e22927ad6beef0798fe2e8b1f58f4db088f17e571fcc397b1fc95d6ac4f6
|
7
|
+
data.tar.gz: 27a620fec97b85b384377f71ab4ab151eec129695ee60fe07ca2338b059a6e1c47af4c1ba2dc6c2072b778aa2233fff01c70a8968939f756ccfadeba1f9961e2
|
data/README.md
CHANGED
@@ -41,7 +41,7 @@ docker-compose version 1.21.0, build 5920eb0
|
|
41
41
|
...You are now ready to either a) greenfield a handsome new app or b) handsomize an existing one.
|
42
42
|
|
43
43
|
|
44
|
-
## Greenfielding a
|
44
|
+
## Greenfielding a fully dockerized Rails application:
|
45
45
|
|
46
46
|
1) Execute the install command:
|
47
47
|
|
@@ -9,54 +9,24 @@ jobs:
|
|
9
9
|
machine: true
|
10
10
|
steps:
|
11
11
|
- checkout
|
12
|
-
-
|
13
|
-
- run:
|
14
|
-
- run:
|
15
|
-
- run:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
- setup_remote_docker
|
25
|
-
- run: gem install handsomefencer-environment
|
26
|
-
- run: ruby expose_env.rb
|
27
|
-
- run: docker-compose up -d --build
|
12
|
+
- add_ssh_keys
|
13
|
+
- run: bundle --gemfile='.circleci/Gemfile'
|
14
|
+
- run: handsome_fencer-circle_c_i expose development
|
15
|
+
- run: handsome_fencer-circle_c_i expose circle
|
16
|
+
- run: echo 'source .circleci/circle.env' >> $BASH_ENV
|
17
|
+
- run: docker-compose build
|
18
|
+
- run: docker-compose up -d
|
19
|
+
- run: docker-compose exec app bin/rails db:create db:migrate
|
20
|
+
- run: docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
|
21
|
+
- run:
|
22
|
+
name: Tag app image
|
23
|
+
command: docker tag $(docker images | grep project_app | awk '{ print $3 }') ${DOCKERHUB_ORG_NAME}/${APP_NAME}_app:$DEPLOY_TAG
|
28
24
|
- run:
|
29
25
|
name: Tag web image
|
30
|
-
command: docker tag $(docker images | grep project_web | awk '{ print $3 }')
|
31
|
-
- run: docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
|
32
|
-
- run: docker push rennmappe/bacchanal_web:$DEPLOY_TAG
|
26
|
+
command: docker tag $(docker images | grep project_web | awk '{ print $3 }') ${DOCKERHUB_ORG_NAME}/${APP_NAME}_web:$DEPLOY_TAG
|
33
27
|
|
34
|
-
deploy:
|
35
|
-
docker:
|
36
|
-
- image: circleci/ruby:2.5.1-node-browsers
|
37
|
-
environment:
|
38
|
-
BASH_ENV: .env/circle/deploy.env
|
39
|
-
steps:
|
40
|
-
- checkout
|
41
|
-
- add_ssh_keys
|
42
|
-
- run: bundle install --without production
|
43
|
-
- run: ruby expose_env.rb
|
44
|
-
- run: bin/rails docker:deploy
|
45
28
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
- build
|
51
|
-
- push:
|
52
|
-
requires:
|
53
|
-
- build
|
54
|
-
filters:
|
55
|
-
branches:
|
56
|
-
only: master
|
57
|
-
- deploy:
|
58
|
-
requires:
|
59
|
-
- push
|
60
|
-
filters:
|
61
|
-
branches:
|
62
|
-
only: master
|
29
|
+
- run: docker push ${DOCKERHUB_ORG_NAME}/${APP_NAME}_app:$DEPLOY_TAG
|
30
|
+
- run: docker push ${DOCKERHUB_ORG_NAME}/${APP_NAME}_web:$DEPLOY_TAG
|
31
|
+
|
32
|
+
- run: rake --rakefile .circleci/Rakefile
|
@@ -0,0 +1,62 @@
|
|
1
|
+
defaults: &defaults
|
2
|
+
working_directory: /tmp
|
3
|
+
|
4
|
+
version: 2
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
|
8
|
+
build:
|
9
|
+
machine: true
|
10
|
+
steps:
|
11
|
+
- checkout
|
12
|
+
- run: gem install handsome_fencer-circle_c_i
|
13
|
+
- run: ruby .circleci/expose_env.rb
|
14
|
+
- run: docker-compose build dev_app database
|
15
|
+
- run: docker-compose run dev_app bin/rails db:create db:migrate test
|
16
|
+
|
17
|
+
push:
|
18
|
+
docker:
|
19
|
+
- image: circleci/ruby:2.5.1-node-browsers
|
20
|
+
environment:
|
21
|
+
BASH_ENV: .env/circle/deploy.env
|
22
|
+
steps:
|
23
|
+
- checkout
|
24
|
+
- setup_remote_docker
|
25
|
+
- run: gem install handsomefencer-environment
|
26
|
+
- run: ruby expose_env.rb
|
27
|
+
- run: docker-compose up -d --build
|
28
|
+
- run:
|
29
|
+
name: Tag web image
|
30
|
+
command: docker tag $(docker images | grep project_web | awk '{ print $3 }') rennmappe/bacchanal_web:$DEPLOY_TAG
|
31
|
+
- run: docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
|
32
|
+
- run: docker push rennmappe/bacchanal_web:$DEPLOY_TAG
|
33
|
+
|
34
|
+
deploy:
|
35
|
+
docker:
|
36
|
+
- image: circleci/ruby:2.5.1-node-browsers
|
37
|
+
environment:
|
38
|
+
BASH_ENV: .env/circle/deploy.env
|
39
|
+
steps:
|
40
|
+
- checkout
|
41
|
+
- add_ssh_keys
|
42
|
+
- run: bundle install --without production
|
43
|
+
- run: ruby expose_env.rb
|
44
|
+
- run: bin/rails docker:deploy
|
45
|
+
|
46
|
+
workflows:
|
47
|
+
version: 2
|
48
|
+
build-and-deploy:
|
49
|
+
jobs:
|
50
|
+
- build
|
51
|
+
- push:
|
52
|
+
requires:
|
53
|
+
- build
|
54
|
+
filters:
|
55
|
+
branches:
|
56
|
+
only: master
|
57
|
+
- deploy:
|
58
|
+
requires:
|
59
|
+
- push
|
60
|
+
filters:
|
61
|
+
branches:
|
62
|
+
only: master
|
@@ -5,7 +5,7 @@ services:
|
|
5
5
|
app:
|
6
6
|
build:
|
7
7
|
context: .
|
8
|
-
dockerfile:
|
8
|
+
dockerfile: docker/containers/app/Dockerfile
|
9
9
|
|
10
10
|
depends_on:
|
11
11
|
- database
|
@@ -16,8 +16,8 @@ services:
|
|
16
16
|
- .:/usr/src/app
|
17
17
|
- gem_cache:/gems
|
18
18
|
env_file:
|
19
|
-
-
|
20
|
-
-
|
19
|
+
- docker/containers/database/development.env
|
20
|
+
- docker/containers/app/development.env
|
21
21
|
command: [ "bin/rails", "s" ]
|
22
22
|
|
23
23
|
stdin_open: true
|
@@ -28,7 +28,7 @@ services:
|
|
28
28
|
database:
|
29
29
|
image: postgres
|
30
30
|
env_file:
|
31
|
-
-
|
31
|
+
- docker/containers/database/development.env
|
32
32
|
|
33
33
|
volumes:
|
34
34
|
- database-data:/var/lib/postgresql/data
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handsome_fencer-circle_c_i
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- schadenfred
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sshkit
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rails
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: byebug
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +122,7 @@ files:
|
|
136
122
|
- lib/handsome_fencer/circle_c_i/templates/Gemfile
|
137
123
|
- lib/handsome_fencer/circle_c_i/templates/Gemfile.lock
|
138
124
|
- lib/handsome_fencer/circle_c_i/templates/circleci/config.yml
|
125
|
+
- lib/handsome_fencer/circle_c_i/templates/circleci/config.yml.workflow-example
|
139
126
|
- lib/handsome_fencer/circle_c_i/templates/config/database.yml
|
140
127
|
- lib/handsome_fencer/circle_c_i/templates/docker-compose.yml
|
141
128
|
- lib/handsome_fencer/circle_c_i/templates/docker/containers/app/Dockerfile
|