Coder Social home page Coder Social logo

imclab / community-platform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duckduckgo/community-platform

0.0 2.0 0.0 15.18 MB

DuckDuckGo Community Platform

Home Page: https://duck.co/

Perl 57.89% CSS 17.21% JavaScript 24.50% Shell 0.33% Lua 0.08%

community-platform's Introduction

DuckDuckGo - Community Platform

New documentation in progress! Please only try if you know what you are doing.

REQUIREMENTS

Requires perl 5.14.2 (or higher) and:

apt-get install cpanm build-essential libgd2-xpm-dev libssl-dev git wget libxml2-dev imagemagick perl-doc postgresql libpq-dev

(This requires PostgreSQL for the recommended setup.) The above uses apt-get for Debian-based distributions including Ubuntu. If you're using a different distribution, the command may differ.

You'll next need to make sure you install Dist::Zilla module:

cpanm -i Dist::Zilla

INSTALLATION

After checking out, you will need to install the prerequisite modules. You must have installed Dist::Zilla. Then, you can do the following to install the base Perl requirements (run this in the source root with dist.ini file):

dzil authordeps --missing | cpanm
dzil listdeps --missing | grep -v abstract | cpanm

If you're doing this on a fresh Perl install, this may take a while to install.

Additionally, you must install DDGC deps from duckpan:

duckpan DDGC::Static

To start, you must first initialize the base database. The default is to use SQLite if no Database configuration environment variables are found, but it is strongly recommended to use Postgresql. To do this, make sure you set the following 3 environment variables before proceeding further (and these variables need to be set permanently post this, so you need to put them in a .bashrc or correspdonding initialization scripts for your shell):

(Use your preferred database name / user / password values)

DDGC_DB_DSN='dbi:Pg:database=ddgc'
DDGC_DB_USER='ddgc'
DDGC_DB_PASSWORD='yourdbpass'

Note: Do ensure that the user ('ddgc' in above example) has the 'createdb' permission. To do this, login to psql as a superuser and run:

ALTER USER ddgc CREATEDB

Now, run the script to initialize the base database:

script/ddgc_deploy_dev.pl

Do note that the script will complain if you already have an existing database at the target location. If this happens, you would need to use use the --kill switch to reset it:

script/ddgc_deploy_dev.pl --kill

For the flags to work, you need to generate the sprites used for the flags. This process has to be repeated everytime the country flags are changed.

script/ddgc_generate_flag_sprites.pl

DEVELOPING

You can start the web server, if you are inside the repository with:

script/ddgc_web_server.pl -r -d

If you want to do any of the above activities with intense debug logging you can use the following ENV variables before the command, like in this example:

DBIC_TRACE_PROFILE=console DBIC_TRACE=1 script/ddgc_web_server.pl -r -d

The -r switch assures that it reloads itself, if some of the codefiles are changed. For changes on templates he will not restart. (If you work on the blog you sadly have to restart by hand if you change the data file).

The -d switch sets the web server into debugging mode. This activates a side bar with additional request informations, and also shows you much more informations on the terminal. If you don't want those, you can just deactivate it. For work on HTML/CSS or the blog it might disturb.

ACCOUNTS

We prepared some accounts for testing in the default setup, those can all be accessed with random passwords (yes, you can't test wrong password yet, sorry).

The following account exist:

* testone An admin, who is native German but also speaks English.

* testtwo A normal user who speaks Spanish with public profile.

* testthree A translation_manager who speaks English, Arabic, and German.

* testfour An admin, who speaks German, Spanish, and English.

* testfive A normal user without public profile, who speaks Russian and English.

* Additionally there are also test1 to test100 all without any setup.

community-platform's People

Contributors

cosinuz avatar crazedpsyc avatar deskfolio avatar dotmanish avatar getty avatar kentfredric avatar majuscule avatar moollaza avatar mrshu avatar niftylettuce avatar rpicard avatar scepticrail avatar sdougbrown avatar smpeters avatar stommepoes avatar superuser-does avatar the-solipsist avatar wreis avatar zekiel avatar

Watchers

 avatar  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.