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

chrda81/athene2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Athene2

Build status Kanban board

Installation

You need Docker, php-cli and node installed on your system.

On Windows we recommend Bash on Ubuntu on Windows.

Now follow the upcoming instructions.

Clone the project

# Clone the project:
$ git clone git@github.com:serlo-org/athene2.git
$ cd athene2

Bootstrapping the project

If you are on windows, run the following in Bash on Windows:

# Copy some config files
$ cp docker-compose.dist.yml docker-compose.yml
$ cp src/config/autoload/local.dist.php src/config/autoload/local.php
$ cp src/config/autoload/develop.local.dist.php src/config/autoload/develop.local.php
$ cp src/public/htaccess.dist src/public/.htaccess

# Install various dependencies
$ php composer.phar install

Starting docker-compose

docker-compose up --build -d

Troubleshooting

Wrong php version

If php composer.phar install fails with error

Your requirements could not be resolved to an installable set of packages.
 Problem 1
 - doctrine/collections v1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
 - doctrine/collections v1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
 - Installation request for doctrine/collections v1.4.0 -> satisfiable by doctrine/collections[v1.4.0].

then you can try updating php to 5.6:

sudo apt-get remove php5-cli
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6-cli
npm install failing

Try a different node version (i.e. using nvm). Try using node version 0.12.5

Also try cleaning the cache and rebuilding: make sure to cd to the correct location first!

npm cache clean -f
npm rebuild
postinstall script: bower fails

If you get an error like bower ESUDO Cannot be run with sudo then try running

npm run bower -- --allow-root
npm run build

Now you can start the cluster

# Start the docker-compose cluster.
# ps: The database import might take some time (1-10 minutes).

# If you are on Windows, run this in regular cmd.exe

$ docker-compose up --build

Setting up hosts

On windows, please add

127.0.0.1 de.serlo.localhost
127.0.0.1 en.serlo.localhost

to your C:\Windows\System32\drivers\etc\hosts.txt file. Then run ipconfig /flushdns in cmd.exe and restart your browser.

On OSX:

sudo nano /etc/hosts

# add lines
127.0.0.1    de.serlo.localhost
127.0.0.1    en.serlo.localhost

# flush mac DNS cache
sudo killall -HUP mDNSResponder

Now, open de.serlo.localhost:4567. Happy coding!

ps: de.serlo.localhost:4567 works for me in chrome but not in FireFox. Not sure why, but if it doesn't work try a different browser.

Development

Development is straight forward, make your changes to the php files and then reload the browser. Done!

If you want to modify the assets (e.g. .css, .js files), you will also have to clone and set up https://github.com/serlo-org/athene2-assets:

git clone https://github.com/serlo-org/athene2-assets
cd athene2-assets
yarn
yarn start

Furthermore, set assets_host to the url of webpack dev server in src/config/autoload/develop.local.php:

return [
    // ...
    'assets_host' => 'http://localhost:8081/'
];

Changes to the assets will automatically reload the browser.

Further resources

Most of these are outdated:

About

Athene2, the Serlo CMS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 64.5%
  • HTML 18.3%
  • JavaScript 16.1%
  • CSS 0.8%
  • Shell 0.2%
  • Dockerfile 0.1%