GithubHelp home page GithubHelp logo

metzgaria / athene2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from serlo/athene2

0.0 1.0 0.0 28.94 MB

Athene2, the Serlo CMS.

Home Page: https://serlo.org

License: Other

PHP 63.62% Shell 0.26% JavaScript 21.41% HTML 13.64% CSS 1.07%

athene2's Introduction

Athene2

Build Status Kanban board

Installation

You need Docker php-cli and node installed on your system. To build the assets you also need to install ruby-sass and ruby-compass installed.

On Windows we recommend Bash on Ubuntu on Windows. You can install the dependencies above (except Docker) with:

sudo apt install php7.2-cli nodejs node-gyp ruby-sass ruby-compass

WARNING ruby.compass must be in version range 0.12.2 and ruby-sass must be in version range 3.2.10 - check this with compass version and sass -v. If versions mismatch, building the assets will fail! Bash on Windows installs the right versions out of the box (at least on my system).

Now follow the upcoming instructions.

Clone the project

# Clone the project:
$ git clone [email protected]: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 src/config/autoload/local.php.dist src/config/autoload/local.php
$ cp src/config/autoload/develop.local.php.dist 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:

athene2's People

Contributors

arekkas avatar dafischer avatar elbotho avatar inyono avatar jonasbley avatar kklemon avatar knorrke avatar npreiber avatar philer avatar steffenbarthel avatar thetaris avatar victorcorreae avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.