Skip to content

Commit

Permalink
Merge branch 'score-check-beatmap' into solo-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Jan 3, 2023
2 parents 7ddac59 + 8cbaeef commit a2bb252
Show file tree
Hide file tree
Showing 963 changed files with 11,416 additions and 10,797 deletions.
2 changes: 0 additions & 2 deletions .env.dusk.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ DB_DATABASE_STORE=osu_store_test
DB_DATABASE_UPDATES=osu_updates_test

ES_INDEX_PREFIX=test_

CACHE_DRIVER_LOCAL=array
9 changes: 7 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ OSU_API_KEY=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
# CACHE_DRIVER_LOCAL=file
SESSION_DRIVER=file
# SESSION_DOMAIN=
# SESSION_SECURE_COOKIE=false
Expand Down Expand Up @@ -207,7 +206,7 @@ CLIENT_CHECK_VERSION=false
# CHAT_PUBLIC_WINDOW=1
# CHAT_PRIVATE_LIMIT=1
# CHAT_PRIVATE_WINDOW=1
# CHAT_MESSAGE_LENGTH_LIMIT=100
# CHAT_MESSAGE_LENGTH_LIMIT=450
# CHAT_PUBLIC_BACKLOG_LIMIT_HOURS=24

# ALLOW_REGISTRATION=true
Expand All @@ -221,13 +220,16 @@ CLIENT_CHECK_VERSION=false
# space delimited, list of groups (the identifier) which user can be renamed when inactive
# USER_ALLOWED_RENAME_GROUPS="default"

# USER_MAX_FRIENDS=250
# USER_MAX_FRIENDS_SUPPORTER=500
# USER_MAX_MULTIPLAYER_DURATION=14
# USER_MAX_MULTIPLAYER_DURATION_SUPPORTER=63
# USER_MAX_MULTIPLAYER_ROOMS=1
# USER_MAX_MULTIPLAYER_ROOMS_SUPPORTER=5

# USER_MAX_SCORE_PINS=10
# USER_MAX_SCORE_PINS_SUPPORTER=50
# USER_HIDE_PINNED_SOLO_SCORES=true

# the content is in markdown format
# USER_PROFILE_SCORES_NOTICE=
Expand Down Expand Up @@ -279,6 +281,8 @@ CLIENT_CHECK_VERSION=false
# TWITCH_CLIENT_SECRET=

# SCORES_ES_CACHE_DURATION=
# SCORES_EXPERIMENTAL_RANK_AS_DEFAULT=false
# SCORES_EXPERIMENTAL_RANK_AS_EXTRA=false
# SCORES_RANK_CACHE_LOCAL_SERVER=0
# SCORES_RANK_CACHE_MIN_USERS=35000
# SCORES_RANK_CACHE_SERVER_URL=
Expand All @@ -291,3 +295,4 @@ CLIENT_CHECK_VERSION=false
# TRUSTED_PROXIES=

# IS_DEVELOPMENT_DEPLOY=true
# OSU_EXPERIMENTAL_HOST=
14 changes: 13 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ module.exports = {
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', ignoreRestSiblings: true }],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/quotes': [
Expand All @@ -120,12 +121,22 @@ module.exports = {
},
],
'@typescript-eslint/semi': ['error', 'always'],
// TODO: make more strict.
'@typescript-eslint/strict-boolean-expressions': [
'error',
{
allowAny: true,
allowNullableBoolean: true,
allowNullableNumber: true,
allowNullableString: true,
},
],
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unbound-method': 'warn', // TODO: some calls are intentionally unbounded...
'@typescript-eslint/unified-signatures': 'error',
'dot-notation': 'off',
'no-invalid-this': 'off',
'no-shadow': 'off',
'object-curly-spacing': 'off',
quotes: 'off',
'react-hooks/exhaustive-deps': 'error',
'react/jsx-boolean-value': 'error',
Expand Down Expand Up @@ -228,6 +239,7 @@ module.exports = {
'no-trailing-spaces': 'error',
'no-undef-init': 'error',
'no-unsafe-finally': 'error',
'object-curly-spacing': ['error', 'always'],
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'quote-props': ['error', 'as-needed'],
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Install js dependencies
run: yarn --frozen-lockfile

- run: 'yarn lint --max-warnings 197 > /dev/null'
- run: 'yarn lint --max-warnings 158 > /dev/null'

- run: ./bin/update_licence.sh -nf

Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ env:
APP_KEY: base64:q7U5qyAkedR1F6UhN0SQlUxBpAMDyfHy3NNFkqmiMqA=
APP_URL: http://localhost:8000
CACHE_DRIVER: redis
CACHE_DRIVER_LOCAL: array
DB_HOST: 127.0.0.1
DB_USERNAME: root
ES_SOLO_SCORES_HOST: http://localhost:9200
Expand All @@ -19,6 +18,7 @@ env:
NOTIFICATION_REDIS_HOST: 127.0.0.1
OSU_INSTALL_DEV: 1
OSU_USE_SYSTEM_COMPOSER: 1
OSU_DB_CREATE: 1
PAYMENT_SANDBOX: true
PASSPORT_PRIVATE_KEY: |+
-----BEGIN PRIVATE KEY-----
Expand Down Expand Up @@ -72,8 +72,9 @@ jobs:
elasticsearch:
env:
action.auto_create_index: "false"
action.auto_create_index: false
discovery.type: single-node
ingest.geoip.downloader.enabled: false
image: elasticsearch:7.17.6
ports:
- 9200:9200
Expand Down Expand Up @@ -123,23 +124,21 @@ jobs:
- name: Set php version
uses: shivammathur/setup-php@v2
with:
extensions: redis
extensions: redis, swoole
tools: composer:v2
php-version: ${{ matrix.php }}

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- run: mysql -u root -h 127.0.0.1 < ./docker/development/db_setup.sql

- run: ./build.sh

- name: Setup indices
Expand Down
2 changes: 1 addition & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Note that as the actual process is run as non-root user, the files must be world

## Services

The image built serves multiple purposes, each can be run by passing the parameter when starting docker (or as command if using orchestration tools like docker-compose).
The image built serves multiple purposes, each can be run by passing the parameter when starting docker (or as command if using orchestration tools like docker compose).

There are three main commands:

Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.deployment
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common

RUN add-apt-repository ppa:ondrej/php

RUN apt-get update
# jpegtran is not included in `jhead` dependencies in this version of Ubuntu. Revisit when upgrading/changing distro. See https://github.com/ppy/osu-web/pull/9673
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
curl \
Expand All @@ -26,7 +27,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
php8.0-xml \
php8.0-zip \
php8.0 \
zip
zip \
libjpeg-turbo-progs

WORKDIR /app

Expand Down
9 changes: 5 additions & 4 deletions Dockerfile.development
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common

RUN add-apt-repository ppa:ondrej/php

RUN apt-get update
# jpegtran is not included in `jhead` dependencies in this version of Ubuntu. Revisit when upgrading/changing distro. See https://github.com/ppy/osu-web/pull/9673
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
curl \
Expand All @@ -19,7 +20,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
php8.0-common \
php8.0-curl \
php8.0-ds \
php8.0-fpm \
php8.0-gd \
php8.0-intl \
php8.0-mbstring \
Expand All @@ -31,7 +31,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
php8.0-xml \
php8.0-zip \
php8.0 \
zip
zip \
libjpeg-turbo-progs

RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get update
Expand All @@ -49,4 +50,4 @@ WORKDIR /app
RUN groupadd osuweb && useradd -g osuweb osuweb

ENTRYPOINT ["/app/docker/development/entrypoint.sh"]
CMD ["serve"]
CMD ["octane"]
Loading

0 comments on commit a2bb252

Please sign in to comment.