Commit graph

58 commits

Author SHA1 Message Date
Matchu
e121d8bba2 Remove SWF conversion
We've already swapped out the backend for this stuff to Impress 2020, so the resque task and the broken image report UI aren't actually relevant anymore. Delete them!

This helps us delete Resque soon too.
2023-10-23 19:05:04 -07:00
Matchu
b35c773be3 Remove flex from the app (breaks search!)
We'll need to replace the item search query stuff with direct MySQL queries, but that's not ready yet bc the app still isn't booting, so we're committing this in a known broken state for now!
2023-10-23 19:05:02 -07:00
Matchu
1ed973f319 Remove newrelic gem
I haven't logged into newrelic in a billion years, let's just stop sending them stuff

(This is a precursor to an attempt to delete flex stuff too and replace our elasticsearch stuff with direct mysql queries like Impress 2020 does, but that'll be more work!)
2023-10-23 19:05:02 -07:00
Matchu
ca858f1350 Remove unused Devise initializer settings
I guess the APIs changed here, but these were placeholder settings we weren't actually using anyway (cuz we use the OpenNeo ID integration), so I just commented them out and it seems fine for now!
2023-10-23 19:05:02 -07:00
Matchu
72a08901c8 Upgrade to Ruby 2.2.4, Rails 4.0.13
NOTE: This doesn't boot yet! There's something changed in the `devise` API that we'll need to fix!

```
/vagrant/config/initializers/devise.rb:46:in `block in <top (required)>': undefined method `encryptor=' for Devise:Module (NoMethodError)
```

But yeah, we navigated the gem upgrades, and also I ran `rake rails:update` and hand-processed the suggestions it had for our config files.
2023-10-23 19:05:02 -07:00
Matchu
7f8f7e624d Remove references to the Stripe gem
Rather than figure out how to upgrade the Stripe gem to be compatible with future Rails, I'd rather just delete the references, since it's currently unused.

I'm not so bold as to go in and fully trash all our donation code; I just want to ensure we're not sending people down broken codepaths, and that if they reach them, the error messages are clear enough.
2023-07-21 18:54:15 -07:00
3ae8a265b2
Use Fastly to cache our PNG assets from S3
We've been serving images directly from `impress-asset-images.s3.amazonaws.com` for a long time. While they serve with long-lasting HTTP cache headers, and the app requests them with the `updated_at` timestamp in the query string; each GET request still executes a full S3 ReadObject operation to get the latest version.

In the past, this was only relevant to users on Image Mode, not Flash Mode. But now that everyone's on Image Mode, this matters a lot more!

Now, we've configured a Fastly host at `impress-asset-images.openneo.net`, to sit in front of our S3 bucket. This should dramatically reduce the GET requests to S3 itself, as our cache warms up and gains copies of the most common asset PNGs.

That said, I'm not sure how much actual cost impact this change will have. Our AWS console isn't configured to differentiate cost by bucket yet—I've started this process, but it might take a few days to propagate. All I know is that our current costs are $35/mo data transfer + $20/mo storage, and that outfit images are responsible for most of the storage cost. I hypothesize that `impress-asset-images` is responsible for most of the reads and data transfers, but I'm not sure!

In the future, I think we'll be able to bring our AWS costs to near-zero, by:
- Obsolete `impress-asset-images`, by using the official Neopets PNGs instead, after the HTML5 conversion completes.
- Obsolete `impress-outfit-images`, by using a Node endpoint to generate the images, fronted by a CDN cache. (Transfer the actual data to a long-term storage backup, and replace the S3 objects with redirects, so that old S3 URLs will still work.)

I hope this will be a big slice of the costs though! 🤞

(Note: I'll be deploying this on a bit of a delay, because I want to see the DNS propagate across the globe before flipping to a new domain!)
2021-05-12 22:50:05 -07:00
Matt Dunn-Rankin
822efede84 undo accidental commit
These credentials were never used, and are now revoked. Awkward!
2017-01-06 19:54:17 -08:00
Matchu
4a539f32db hope I did this swfimages fix right xD 2015-08-05 20:22:23 -04:00
Matchu
4a18f22571 camo the emotes on the campaign show page 2015-08-05 19:41:42 -04:00
Matchu
f6a95ddac5 oooops, carrierwave wants s3 config in prod, too 2015-07-17 18:26:43 -04:00
Matchu
a29fbbbd40 move some deploy stuff from files into env 2015-07-17 17:47:58 -04:00
Matchu
7c2600af9f the dev version of neopia has a hostname now :D 2015-07-16 22:37:32 -04:00
Matchu
647c767c31 latest i18n gem cares is stricter about locales, so configure better. this works, right? :x 2015-07-16 18:59:45 -04:00
Matchu
0d6caceb24 improve app infrastructure to make a dev environment easier to reproduce
This commit will require a few changes to the deployment process:
* store AWS credentials in AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env vars
* store OpenNeo Auth credentials in OPENNEO_AUTH_APP, OPENNEO_AUTH_SERVER, and OPENNEO_AUTH_SECRET env vars

STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY are now required, too; better have a good .env.
You can always put in dummy values if you have no credentials, though; they only get called up if there's a transaction.

SECRET_TOKEN is now an env var, too, but the production deploy process currently replaces config/initializers/secret_token.rb anyway; this might be the way to go later, though.
2015-07-16 17:44:52 -04:00
595b1c2fc5 charge and record donations 2014-09-09 21:11:55 -05:00
7c6e607612 basic neopia api integration 2014-01-10 16:25:02 -05:00
daf1f140fb pet rate limit is now 3/30sec 2013-07-02 20:50:34 -07:00
abe35c6fd9 throttle pet loads per ip 2013-07-02 14:10:01 -07:00
349a83123c oops: set flex config.hangers_enabled before the line that checks for its presence 2013-06-11 11:22:17 -07:00
fae0a48bb7 re-enable closet hanger indexing 2013-04-23 22:27:59 -05:00
cc4e2904a1 swfimages cloudfront domain 2013-03-06 20:17:44 -06:00
a66311140f Merge branch 'rails_3_2_12' 2013-03-05 21:10:01 -06:00
5e55423dca now that we're on rails 3.2, mount resque at /resque - just for
meeeeee :)

`User#admin?` is now defined as `name == 'matchu'`. I feel kinda
bad about hardcoding that, but I also don't care enough right
now :P
2013-03-05 21:09:08 -06:00
cf5191d33c phew. rails 3.2.12, including some asset pipeline. still buggy. 2013-03-05 20:08:57 -06:00
3cd06c9f64 resque will reconnect to database after each job to avoid Gone Away errors 2013-03-05 15:14:29 -06:00
250f425509 rails 3.1 upgrade - still buggy 2013-03-05 15:10:25 -06:00
9efd2fe83a have new relic trace flex methods 2013-01-31 18:39:51 -06:00
9a9eea86ec fully disable closet hangers in production 2013-01-30 20:21:27 -06:00
9c6797699e enable hangers in development, disable in production 2013-01-29 23:06:37 -06:00
9fc643152e production elasticsearch search config 2013-01-28 18:29:28 -06:00
a9cdabda49 apparently this fixes resque for spawning child processes. okay. 2013-01-28 03:55:36 -06:00
6c3ff09f5d make en-MEEP translatable - because sorting by translations doesnt work well with fallbacks 2013-01-27 20:43:08 -06:00
7f18fe12c1 user:owns, user:wants queries 2013-01-25 10:35:35 -06:00
6e09b8bc10 globalized search first draft
Confirmed features:
    * Output (retrieval, sorting, etc.)
    * Name (positive and negative, but new behavior)
    * Flags (positive and negative)

Planned features:
    * users:owns, user:wants

Known issues:
    * Sets are broken
        * Don't render properly
        * Shouldn't actually be done as joined sets, anyway, since
          we actually want (set1_zone1 OR set1_zone2) AND
          (set2_zone1 OR set2_zone2), which will require breaking
          it into multiple terms queries.
    * Name has regressed: ignores phrases, doesn't require *all*
      words. While we're breaking sets into multiple queries,
      maybe we'll do something similar for name. In fact, we
      really kinda have to if we're gonna keep sorting by name,
      since "straw hat" returns all hats. Eww.
2013-01-24 18:24:35 -06:00
c9ae7155b1 locale metadata, including hidden locales for item loading and selection 2013-01-24 18:24:34 -06:00
f56b544963 brought-to-you-by on items#show lists contributors 2012-10-24 22:09:05 -05:00
4a69772cd2 remove N+1 queries on current user outfits page 2012-08-09 18:32:33 -04:00
cf2546d832 basic image thumbnails 2012-07-16 16:47:28 -04:00
7c015e2d88 carrierwave for asset swfs 2012-07-16 16:45:26 -04:00
220aca9311 outfit thumbnails initial commit 2012-07-16 16:45:26 -04:00
a6b6bbaeca rewrite donors copy a bit 2011-07-02 13:23:38 -04:00
5ecd5f3ce4 donate page noninteractive 2011-06-28 13:24:40 -04:00
43f373fc36 use resque-retry to reschedule failed jobs 2011-06-21 11:22:45 -04:00
b13fd7ae99 moving toward s3 image storage 2011-05-20 19:19:14 -04:00
38907bc2d6 remove deprecated hoptoad js_notifier option 2011-05-13 08:27:57 -04:00
ca95cfb722 disabling the hoptoad js notifier may have fixed the leak... maybe 2011-02-05 11:48:54 -05:00
8c8776ff63 devise implemented, but not remembering 2011-01-26 13:40:15 -05:00
7b2ed2cca4 include hoptoad 2010-11-14 16:06:31 -05:00
ba8525e55b disable asset packaging for the moment 2010-11-13 22:04:41 -05:00