Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]: Infrastructure Rebuild #363

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
eab45fe
Listen on port 3000
Aug 23, 2016
ebabcc6
Log to stdout
Aug 5, 2016
cf9ebab
new deployment config
Xylakant Aug 23, 2016
b2b9df9
remove stage from the deployment path
Xylakant Aug 23, 2016
8953041
add asset server in the web role
Xylakant Aug 23, 2016
d5c7f26
comment asset server
Xylakant Aug 23, 2016
4c78e73
change tld from consul to production
Xylakant Aug 25, 2016
cea5d66
precompile locally instead of on the server
Xylakant Aug 26, 2016
c2ed2e1
make deployment mostly work
Xylakant Aug 29, 2016
e973fa9
unicorn -> webapp
Xylakant Aug 29, 2016
bb23675
fix unicorn config
Xylakant Aug 30, 2016
96f2619
bump capistrano version to 3.6.1
Xylakant Aug 30, 2016
1bb9f88
add bundle config
Xylakant Aug 30, 2016
8790aea
fix various deployement-related issues
Xylakant Aug 30, 2016
718d69f
Use tmp as shared instead of specific subfolders
Aug 31, 2016
1f03658
symlink assets after deploy
Xylakant Aug 30, 2016
bd8b030
Update prod branch to the main infra-rebuild since the merge happened
Sep 1, 2016
de8977c
Reflect changes to deploy.rb in staging.rb
Sep 1, 2016
894fc2c
Forgot stage...
Sep 1, 2016
1bc3d8e
Don't keep dead code
Sep 1, 2016
7711197
Fix branch for staging deployments.
Sep 5, 2016
16dbf95
Use asset manifest
Sep 7, 2016
3aafeeb
Copy manifest to apps
Sep 6, 2016
a9ed9ff
App is a deploy role, don't need this code block
Sep 6, 2016
b627306
Use asset%d.wheelmap.org instead of staging.wheelmap.org
Sep 6, 2016
4446f09
Reflect URL changes as discussed
Sep 6, 2016
fe8b796
Test cap (Do not merge this)
Sep 7, 2016
0e367a2
public assets should not be shared between deploys.
Sep 7, 2016
b023075
noop :set_linked_dirs
Sep 7, 2016
079f1a7
Properly noop :set_linked_dirs
Sep 7, 2016
d6e4f56
Linting
Sep 7, 2016
18dd00d
Revert branch redirect. Safe for merge
Sep 7, 2016
304d768
Reflect the new node names. Worker has a number
Sep 8, 2016
f889ce2
Add ping file for healthchecks
Oct 4, 2016
6d07642
New dot domains
Sep 21, 2016
828ca39
Sync the entire public folder to the asset host.
Oct 13, 2016
1bb87db
Correct paths for sprockets
Oct 13, 2016
8d4c015
Correct sprockets location
Oct 13, 2016
b600d5d
Migrate to mailgun
Oct 13, 2016
879a575
Correct directories for uploads and link in deploy properly
Oct 19, 2016
8f0ad21
Fix uploads link path
Oct 19, 2016
4ea0a67
Only log WARN and ERROR on production.
Oct 20, 2016
ecf33b5
Correct upload symlink
Jan 5, 2017
971c984
Fix whitespace
Jan 6, 2017
d1e9709
Use memcached on new infra
Jan 13, 2017
ca7d305
syncing changes
Apr 25, 2017
c5bed48
Use bundle
Apr 25, 2017
49ccec1
Merge pull request #541 from sozialhelden/feature/infra-rebuild-syncing
May 22, 2017
ee2e8ba
Correct rsync and symbolic link for asset
May 23, 2017
2608cb1
Remap asset servers
Jul 19, 2017
efb5ef9
Use only 1 asset host
Jul 19, 2017
8e55336
Refine domains a bit
Jul 19, 2017
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
4 changes: 2 additions & 2 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ require 'capistrano/deploy'
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
#
require 'capistrano/rbenv'
#require 'capistrano/rbenv'
require 'capistrano/bundler'
require 'capistrano/npm'
#require 'capistrano/npm'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/deploytags'
Expand Down
13 changes: 9 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ GEM
airbrake (4.3.6)
builder
multi_json
airbrussh (1.1.0)
sshkit (>= 1.6.1, != 1.7.0)
apipie-rails (0.3.6)
json
arbre (1.0.3)
Expand Down Expand Up @@ -112,15 +114,18 @@ GEM
cacheable_flash (0.3.4)
json
stackable_flash (>= 0.0.7)
capistrano (3.4.0)
capistrano (3.6.1)
airbrussh (>= 1.0.0)
capistrano-harrow
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
sshkit (>= 1.9.0)
capistrano-bundler (1.1.4)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-deploytags (1.0.4)
capistrano (>= 3.2.0)
capistrano-harrow (0.5.3)
capistrano-npm (1.0.1)
capistrano (>= 3.0.0)
capistrano-rails (1.1.6)
Expand Down Expand Up @@ -342,7 +347,7 @@ GEM
nenv (0.3.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.0.2)
net-ssh (3.2.0)
newrelic_rpm (3.15.0.314)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
Expand Down Expand Up @@ -504,7 +509,7 @@ GEM
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sshkit (1.9.0)
sshkit (1.11.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackable_flash (0.0.7)
Expand Down
8 changes: 4 additions & 4 deletions app/assets/stylesheets/relaunch/_container.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#container {
background: url('container_bg.png') repeat-x 0 $headerHeight;
background: asset-url('container_bg.png') repeat-x 0 $headerHeight;
display: block;
padding-bottom: $footerHeight + 10px;
padding-top: $headerHeight;
Expand Down Expand Up @@ -45,10 +45,10 @@
padding-left: 80px;
}
p.osm {
background: url("/assets/openstreetmap_logo_small.jpg") no-repeat left center;
background: asset-url("/assets/openstreetmap_logo_small.jpg") no-repeat left center;
}
p.wheelmap {
background: url("/assets/markerhead.jpg") no-repeat 4px center;
background: asset-url("/assets/markerhead.jpg") no-repeat 4px center;
}

em {
Expand Down Expand Up @@ -113,4 +113,4 @@
text-shadow: rgba(255, 255, 255, 0.5), 0, 1px, 1px;
}
}
}
}
4 changes: 2 additions & 2 deletions app/assets/stylesheets/relaunch/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ $helvetica_light: 'HelveticaNeue-Light','Helvetica Neue Light','Helvetica Neue',

@font-face {
font-family: 'EntypoRegular';
src: url('entypo.eot');
src: url('entypo.eot?#iefix') format("embedded-opentype"), url('entypo.woff') format("woff"), url('entypo.ttf') format("truetype"), url('entypo.svg#EntypoRegular') format("svg");
src: asset-url('entypo.eot');
src: asset-url('entypo.eot?#iefix') format("embedded-opentype"), asset-url('entypo.woff') format("woff"), asset-url('entypo.ttf') format("truetype"), asset-url('entypo.svg#EntypoRegular') format("svg");
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/relaunch/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
border-left: 0;
padding: 1px 4px;
margin-left: 5px;
background: url(/assets/bubble-left.png) no-repeat -5px center;
background: asset-url('/assets/bubble-left.png') no-repeat -5px center;
}
}

Expand Down
12 changes: 6 additions & 6 deletions app/assets/stylesheets/relaunch/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
left: 0;
z-index: 2;
float: left;
background: url('bg_header.png');
background: asset-url('bg_header.png');

@include if-min-resolution(1.3) {
background: url([email protected]);
background: asset-url('[email protected]');
}

.navbar-inner {
Expand All @@ -31,10 +31,10 @@
margin: 7px 0 0 0;
float: left;
position: relative;
background: url(bg_logo.png) center left no-repeat;
background: asset-url('bg_logo.png') center left no-repeat;

@include if-min-resolution(1.3) {
background: url([email protected]) center left no-repeat;
background: asset-url('[email protected]') center left no-repeat;
background-size: 150px 32px;
}

Expand All @@ -61,11 +61,11 @@
.christmas & {
width: 160px;
height: 42px;
background-image: url(bg_logo_christmas.png);
background-image: asset-url('bg_logo_christmas.png');
margin-top: 0;

@include if-min-resolution(1.3) {
background-image: url([email protected]);
background-image: asset-url('[email protected]');
background-size: 150px 39px;
}

Expand Down
6 changes: 3 additions & 3 deletions app/assets/stylesheets/relaunch/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
}

.leaflet-marker-icon {
background: transparent url('marker-sprites.png') no-repeat;
background: transparent asset-url('marker-sprites.png') no-repeat;
width: 29px;
height: 32px;
margin-left: -15px;
margin-top: -30px;

@include if-min-resolution(1.3) {
background: transparent url('[email protected]') no-repeat;
background: transparent asset-url('[email protected]') no-repeat;
background-size: 29px 128px;
}

Expand Down Expand Up @@ -58,4 +58,4 @@ $icons: sprite-map("icons/*[^@2x].png");
max-width: 22px;
max-height: 22px;
}
}
}
12 changes: 6 additions & 6 deletions app/assets/stylesheets/relaunch/_leaflet_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

.leaflet-control-locate {
a {
background-image: url('locate_btn.png');
background-image: asset-url('locate_btn.png');
background-position: center center;
background-repeat: no-repeat;
background-color: rgba(255,255,255,0.8);
Expand All @@ -28,18 +28,18 @@
};

@include if-min-resolution(1.3) {
background-image: url('[email protected]');
background-image: asset-url('[email protected]');
}
}

&.requesting a {
background-image: url('spinner_locate.gif');
background-image: asset-url('spinner_locate.gif');
}

&.active a {
background-image: url(locate_btn_active.png);
background-image: asset-url('locate_btn_active.png');
@include if-min-resolution(1.3) {
background-image: url('[email protected]');
background-image: asset-url('[email protected]');
}
}
}
Expand All @@ -65,4 +65,4 @@
a {
white-space: nowrap;
}
}
}
4 changes: 2 additions & 2 deletions app/assets/stylesheets/relaunch/_map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
text-indent:-9999px;
overflow:hidden;
background-repeat:no-repeat;
background-image:url('mapbox_logo.png');
background-image: asset-url('mapbox_logo.png');

@media screen and (max-width:$breakPhone) {
bottom: 13px
}
}
}
6 changes: 3 additions & 3 deletions app/assets/stylesheets/relaunch/_overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
top: 50%;
margin: -325px 0 0 -350px;
padding: 0 0 20px 0;
background: url('bg-overlay.png') #FFF no-repeat;
background: asset-url('bg-overlay.png') #FFF no-repeat;
background-position: 0 219px;
@include box-shadow(0 0 10px #333);
@include border-radius(3px);
Expand Down Expand Up @@ -85,7 +85,7 @@
margin: 0 0 40px 0;
text-align: center;

background: url('logo-overlay.png') center top no-repeat;
background: asset-url('logo-overlay.png') center top no-repeat;

font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -290,4 +290,4 @@
margin-top: 5px;
}
}
}
}
21 changes: 10 additions & 11 deletions app/assets/stylesheets/relaunch/_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,31 +133,31 @@
}

&--yes {
background-image: url('toolbar_marker_yes.png');
background-image: asset-url('toolbar_marker_yes.png');

.popover-title {
background-color: $wheelchair-yes;
}
}

&--limited {
background-image: url('toolbar_marker_limited.png');
background-image: asset-url('toolbar_marker_limited.png');

.popover-title {
background-color: $wheelchair-limited;
}
}

&--no {
background-image: url('toolbar_marker_no.png');
background-image: asset-url('toolbar_marker_no.png');

.popover-title {
background-color: $wheelchair-limited;
}
}

&--unknown {
background-image: url('toolbar_marker_unknown.png');
background-image: asset-url('toolbar_marker_unknown.png');

.popover-title {
background-color: $wheelchair-unknown;
Expand All @@ -166,19 +166,19 @@

@include if-min-resolution(1.3) {
&--yes {
background-image: url([email protected]);
background-image: asset-url('[email protected]');
}

&--limited {
background-image: url([email protected]);
background-image: asset-url('[email protected]');
}

&--no {
background-image: url([email protected]);
background-image: asset-url('[email protected]');
}

&--unknown {
background-image: url([email protected]);
background-image: asset-url('[email protected]');
}
}
}
Expand All @@ -193,15 +193,15 @@
}

&-icon {
background: url('toolbar_marker_icon.png') no-repeat;
background: asset-url('toolbar_marker_icon.png') no-repeat;
background-size: 100%;
width: image_width('toolbar_marker_icon.png');
height: image_height('toolbar_marker_icon.png');
display: inline-block;
margin-top: 1px; // Cosmetic surgery

@include if-min-resolution(1.3) {
background-image: url('[email protected]');
background-image: asset-url('[email protected]');
}
}

Expand Down Expand Up @@ -616,4 +616,3 @@
}
}
}

4 changes: 3 additions & 1 deletion app/uploaders/photo_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class PhotoUploader < CarrierWave::Uploader::Base
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
File.join('system', 'uploads', model.class.to_s.underscore, subdirs)
# File.join('uploads', model.class.to_s.underscore, mounted_as.to_s, subdirs)
end
def cache_dir
File.join('system', 'uploads', 'tmp', model.class.to_s.underscore)
end

def subdirs
Expand Down
Loading