fork
Configure Feed
Select the types of activity you want to include in your feed.
the browser-facing portion of osu!
fork
Configure Feed
Select the types of activity you want to include in your feed.
1#!/bin/sh
2
3set -u
4set -e
5
6export COMPOSER_ALLOW_SUPERUSER=1
7export COMPOSER_NO_INTERACTION=1
8
9# The user when provisioning is different than the user running actual php workers (in production).
10if [ -z "${OSU_SKIP_CACHE_PERMISSION_OVERRIDE:-}" ]; then
11 # Don't fail if permissions don't get set on all files.
12 chmod -R 777 storage bootstrap/cache || true
13fi
14
15if [ -z "${OSU_USE_SYSTEM_COMPOSER:-}" ]; then
16 COMPOSER="php composer.phar"
17
18 if [ -f composer.phar ]; then
19 php composer.phar self-update --2
20 else
21 curl -sL "https://getcomposer.org/download/latest-2.x/composer.phar" > composer.phar
22 fi
23else
24 COMPOSER="composer"
25fi
26
27if [ -n "${GITHUB_TOKEN:-}" ]; then
28 ${COMPOSER} config -g github-oauth.github.com "${GITHUB_TOKEN}"
29fi
30
31rm -f bootstrap/cache/*.php bootstrap/cache/*.json
32
33if [ -z "${OSU_INSTALL_DEV:-}" ]; then
34 ${COMPOSER} install --no-dev
35else
36 ${COMPOSER} install
37fi
38
39php artisan view:clear
40
41if [ -n "${OSU_DB_CREATE:-}" ]; then
42 php artisan db:create
43fi
44
45# e.g. OSU_SKIP_DB_MIGRATION=1 ./build.sh to bypass running migrations
46if [ -z "${OSU_SKIP_DB_MIGRATION:-}" ]; then
47 php artisan migrate --force
48else
49 echo "OSU_SKIP_DB_MIGRATION set, skipping DB migration."
50fi
51
52if [ -z "${PASSPORT_PUBLIC_KEY:-}" ]; then
53 php artisan passport:keys
54fi
55
56# e.g. OSU_SKIP_ASSET_BUILD=1 ./build.sh to bypass building javascript assets
57if [ -z "${OSU_SKIP_ASSET_BUILD:-}" ]; then
58 if [ ! -d node_modules ]; then
59 mkdir -p ~/node_modules
60 ln -snf ~/node_modules node_modules
61 fi
62
63 command -v yarn || npm install -g yarn
64 if [ -z "${OSU_INSTALL_DEV:-}" ]; then
65 yarn --prod --ignore-optional --frozen-lockfile
66 else
67 yarn
68 fi
69 yarn run production
70else
71 echo "OSU_SKIP_ASSET_BUILD set, skipping javascript asset build."
72fi
73
74php artisan ip2asn:update