Skip to content
This repository was archived by the owner on Apr 6, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Commented envs are optional
# For further config options check the READMEs.
# The ENVs specified are required by at least 2 servers.

#############
# common
#############

# postgres url (shared between republik and publikator)
DATABASE_URL=postgres://patte@localhost:5432/republik

# redis url, leave blank for default: 127.0.0.1:6379
#REDIS_URL=

# url to republik-frontend
# used by
# - auth to construct token links
# - assets to proxy requests to the frontend
# - documents to construct absolute document links
# - republik for payment redirect urls
FRONTEND_BASE_URL=http://localhost:3010

# log requsts that take longer than the specified ms
#REQ_TIMEOUT=2000

#############
# auth
#############

# express-session's secret
SESSION_SECRET=RANDOM

# where to send auth mails from
AUTH_MAIL_FROM_ADDRESS="kontakt@republik.ch"

# the mandril template's name
AUTH_MAIL_TEMPLATE_NAME=cf_signin

#############
# mail
#############

# mails are plotted to stdout if set to false
SEND_MAILS=false

# required for mails to work, set SEND_MAILS to false for a quick start
#MANDRILL_API_KEY=

DEFAULT_MAIL_FROM_ADDRESS="kontakt@republik.ch"
DEFAULT_MAIL_FROM_NAME="Republik"

# mailchimp
# used by
# - publikator to create campaigns and upload html
# - republik to set interests based on belongings of a user
#MAILCHIMP_URL=
#MAILCHIMP_API_KEY=

#############
# assets
#############

ASSETS_SERVER_BASE_URL=http://localhost:5020

# shared secret which which publikator-backend authenticates urls to assets-backend
# min 32bit
ASSETS_HMAC_KEY=RANDOM

# AWS secrets
# used by
# - republik to upload (profile) images
# - publikator to upload images on publish
AWS_REGION=eu-central-1
AWS_S3_BUCKET=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

#############
# github
#############

# log ratelimit every 15min to stdout
#GITHUB_LOG_RATELIMIT=true

# checkout the README on how to get these
GITHUB_LOGIN=
GITHUB_APP_ID=
GITHUB_APP_KEY=
GITHUB_INSTALLATION_ID=
50 changes: 50 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
language: node_js
node_js:
- '8.9.4'
cache:
directories:
- node_modules
yarn: true
notifications:
email: false
addons:
postgresql: "9.6"
services:
- postgresql
- redis-server
branches:
only:
- master
matrix:
include:
- env:
- TEST_DIR=servers/republik
- DATABASE_URL=postgres://postgres@localhost:5432/republik-test
- env:
- TEST_DIR=servers/publikator
- DATABASE_URL=postgres://postgres@localhost:5432/publikator-test
env:
global:
- NODE_ENV=development
- PORT=6000
- PUBLIC_WS_URL_BASE=ws://localhost:6000
- PUBLIC_WS_URL_PATH=/graphql
- SEND_MAILS=false
- FORCE_TEST_END=true
- AUTO_LOGIN=true
- SESSION_SECRET=testtest
- DEFAULT_MAIL_FROM_NAME='travis'
- DEFAULT_MAIL_FROM_ADDRESS='travis@test.project-r.construction'
- AUTH_MAIL_FROM_ADDRESS='travis@test.project-r.construction'
- FRONTEND_BASE_URL=http://localhost:6000
- LOCAL_ASSETS_SERVER=true
- ASSETS_SERVER_BASE_URL=http://localhost:6000
- ASSETS_HMAC_KEY=testtest
- PARKING_PLEDGE_ID=00000000-1234-0000-0000-000000000001
- PARKING_USER_ID=00000000-4321-0000-0000-000000000001
- DISPLAY_AUTHOR_SECRET=testtest
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- export PATH=$HOME/.yarn/bin:$PATH
script:
- cd $TEST_DIR && yarn run test:travis
Loading