Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

Timestamps are not reliable/consistent #2

Open
timkelty opened this issue Apr 16, 2018 · 3 comments
Open

Timestamps are not reliable/consistent #2

timkelty opened this issue Apr 16, 2018 · 3 comments

Comments

@timkelty
Copy link
Contributor

time() and DirectoryIterator::getMTime are used to generate and update the timestamp used for the directory revision, however, this is not necessarily going to be consistent when deployed across multiple servers (e.g. a load balanced app).

I'm not sure the best way to address this, but it was the first thing I ran into.

At the moment, I seem to have it working by parsing a consistent env var that exists in our deploy, from which I can extract a timestamp: timkelty@0941726

@ostark
Copy link
Contributor

ostark commented Apr 16, 2018

@timkelty Why do you run craft asset-bundler/publish on each server? You should run it once (in your deploy/build process) and then distribute the files to all servers.

@timkelty
Copy link
Contributor Author

@ostark good point -- the reason is because we're deploying docker images and currently we don't ship our images with composer as to keep our image size down.

Our deployment process builds the image, distributes it, and then runs composer install (and craft asset-bundler/publish).

@ostark
Copy link
Contributor

ostark commented Apr 16, 2018

@timkelty I'd prefer something like this:
craft asset-bundler/publish --forceRevision=$TIMESTAMP_OF_RELEASE

4b32dc4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants