Prototype made in Craft CMS:
http://lederhuset.herokuapp.com
Implemented in Episerver by Epinova / Novacare:
https://www.virke.no/arbeidsgiverguiden
See 1password for login to Craft admin.
Based on the Netlife Craft Starter:
Read through the readme, and if you are stuck, don't hesitate to ask in either #frontend or #craft in Slack. If you have made some smart improvement to the tooling or setup of in your Craft project, please contribute to this starter by making a pull request.
- Clone, or download this repository
- If you haven't already install Docker and Node, see guide below.
- Run
npm install
to install NPM dependencies. - Run
docker-compose up
to start three containers (details found in docker-compose.yml):- Apache Server, to mirror production environment.
- Redis, used for caching logins included so that we mirror production.
- Mysql, the database.
- It might/will take some time for the containers to finish building and there will be no complete message. So, just wait 2min until the text stops flowing and then go to
http://localhost:5000/admin
to install Craft.
Then run npm run dev
to start a process that will be building our frontend dependencies. Our build setup provides a localhost:3000 address that shows the same as localhost:5000 but also has livereloading.
Edit Sass and JavaScript in the /resources/
-folder. Webpack will compile, transpile, minify it into the public
folder, ready for production. If you put files in the assets-folder, Webpack will handle those too. The style.scss
is built into public/style.css
and it injects vendor prefixes and inlines smaller static resources (icon fonts for example). The file resources/js/app.js
is built into public/js/min/app.min.js
, and it uses Browserify + Babel, allowing you to both write ES6 as well as using a Node.js style if you prefer.
Both files are properly included in craft/templates/_layout.twig
If you have cloned this project, the git remote origin
is set to the craft-starter repository. Unless you're actually working on improving the craft-starter, you should set the remote origin
to your project repository.
- Remove the current
origin
withgit remote rm origin
- Add the new origin with
git remote add origin [email protected]:netliferesearch/repository-name
- Push to the new origin with
git push --set-upstream origin master
Push this button (remember to set the correct region)
Make sure you install global dependencies like Heroku toolbelt first.
heroku create <name> --region eu
heroku buildpacks:add heroku/php
heroku buildpacks:add heroku/nodejs
heroku addons:create jawsdb
heroku addons:create heroku-redis
heroku config:add NPM_CONFIG_PRODUCTION=false
heroku config:add CRAFT_VALIDATION_KEY=anyuniquekey
<= generate this key yourself
heroku git:remote <name>
heroku config -s | tr -d "'" > .env
- Get your local database up and running or connect to the remote database
We usually use S3 on Amazon Web Services. Ask @kmelve about access to a bucket.
Perform the following steps in a terminal: You only need to do this once per system.
- Install Heroku toolbelt https://toolbelt.heroku.com/
brew install heroku
brew install nvm
Peow peow!
- Amazon S3: Craft CMS 2.x doesn't support bucket location Frankfurt because it uses a newer authentication method.