Skip to content
Merged

v1.3 #463

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5679a12
Issues-422: Fixed sql query for Flat Tree
atelomycterus Feb 23, 2021
9a2b8f1
Issues-381: optimized code
atelomycterus Feb 23, 2021
6981f7b
Merge pull request #431 from topcoder-platform/issues-422
jmgasper Feb 23, 2021
e01cf5e
Merge pull request #432 from topcoder-platform/issue-381-rev
jmgasper Feb 23, 2021
365e5d7
Issues-434: removed App Title from email subject
atelomycterus Feb 24, 2021
7bf716f
Fixed: admin coudn't see flat categories in Dashboard
atelomycterus Feb 24, 2021
1adbe1f
Merge pull request #436 from topcoder-platform/issues-434
jmgasper Feb 24, 2021
95eaac8
Issues-438: fixed rendring temoplates
atelomycterus Feb 25, 2021
664bc90
Moved filter to CatgeoryModel
atelomycterus Feb 25, 2021
da80ac1
Issues-439: show New discussion if categoty type=discussions
atelomycterus Feb 25, 2021
2b50cd4
Issues-415: custom breadcrumbs for challenge discussions
atelomycterus Feb 25, 2021
c45a9e0
Merge pull request #442 from topcoder-platform/issues-438
jmgasper Feb 25, 2021
7a0689f
Issues-440: added branch param, removed debugBar from prod
atelomycterus Feb 26, 2021
42e787d
Issues-440: fixed link for the theme repo
atelomycterus Feb 26, 2021
ecbbe84
Merge pull request #446 from topcoder-platform/issues-440
jmgasper Feb 27, 2021
f70c829
Issues-440: Fixed branch name
atelomycterus Feb 27, 2021
1ad71c8
Merge pull request #447 from topcoder-platform/issues-440
jmgasper Feb 27, 2021
5114e0e
Issues-419: adding non-link menu item in dropdown
atelomycterus Feb 28, 2021
d25656c
Issues-409: Removed 'in recent discussions' option from Announce popup
atelomycterus Feb 28, 2021
1b7ff32
Merge pull request #448 from topcoder-platform/issues-419
jmgasper Feb 28, 2021
7c5eb19
Issues-449: added new GroupInvitation table
atelomycterus Mar 1, 2021
6cc0f02
Issues-449: added GroupInvitation table
atelomycterus Mar 1, 2021
106b299
Merge pull request #450 from topcoder-platform/issues-449
jmgasper Mar 1, 2021
275f87b
Issues-444: create announcement in a category
atelomycterus Mar 2, 2021
d395af5
Merge pull request #455 from topcoder-platform/issues-444
jmgasper Mar 2, 2021
31dd961
Issues-408
atelomycterus Mar 3, 2021
06701f0
Hide NewDiscussion module in DiscussionsContoller
atelomycterus Mar 3, 2021
913bae0
Merge pull request #457 from topcoder-platform/issues-408
jmgasper Mar 3, 2021
bd8bc7a
Issues-458: fixed target url in Discussion Options Dropdown
atelomycterus Mar 5, 2021
4a8afa4
Merge pull request #460 from topcoder-platform/issues-458
jmgasper Mar 6, 2021
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
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ builddeploy_steps: &builddeploy_steps
- run: *install_dependency
- run: *install_deploysuite
#- restore_cache: *restore_cache_settings_for_build
- run: ./build.sh ${APPNAME} ${CI_DEPLOY_TOKEN} ${LOGICAL_ENV}
- run: ./build.sh ${APPNAME} ${CI_DEPLOY_TOKEN} ${LOGICAL_ENV} ${BRANCH}
#- save_cache: *save_cache_settings
- deploy:
name: Running MasterScript.
Expand All @@ -43,13 +43,15 @@ builddeploy_steps: &builddeploy_steps

jobs:
# Build & Deploy against development backend
# 'BRANCH' is used for plugins and other dependency repos
"build-dev":
<<: *defaults
environment:
DEPLOY_ENV: "DEV"
LOGICAL_ENV: "dev"
APPNAME: "vanilla-forums"
CI_DEPLOY_TOKEN: $CI_DEPLOY_TOKEN
BRANCH: "develop"
steps: *builddeploy_steps

"build-prod":
Expand All @@ -59,6 +61,7 @@ jobs:
LOGICAL_ENV: "prod"
APPNAME: "vanilla-forums"
CI_DEPLOY_TOKEN: $CI_DEPLOY_TOKEN
BRANCH: "master"
steps: *builddeploy_steps

workflows:
Expand Down
59 changes: 41 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ FROM webdevops/php-apache
ARG CI_DEPLOY_TOKEN
ARG VANILLA_VERSION=3.3
ARG ENV
ARG BRANCH

ENV TIDEWAYS_SERVICE vanilla
ENV WEB_DOCUMENT_ROOT /vanillapp

# Get the latest release of Vanilla Forums
Expand All @@ -14,33 +16,42 @@ RUN chmod -R 777 /vanillapp

# Delete the auto-enabled 'stubcontent' plugin which adds stub contents
RUN rm -R /vanillapp/plugins/stubcontent

RUN echo "'$BRANCH' branch will be used for dependency repos ..."

# Clone the forum-plugins repository
RUN git clone https://github.com/topcoder-platform/forums-plugins.git /tmp/forums-plugins
RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-plugins.git /tmp/forums-plugins

# Copy the Filestack plugin
RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-filestack-plugin /tmp/forums-plugins/Filestack

# Copy the Groups plugin
RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-groups-plugin /tmp/forums-plugins/Groups

# Copy the SumoLogic plugin
RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-sumologic-plugin /tmp/forums-plugins/Sumologic

# Copy the TopcoderEditor plugin
RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-topcoder-editor-plugin /tmp/forums-plugins/TopcoderEditor

# Copy the forum-theme repository
RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-theme.git /vanillapp/themes/topcoder

# Remove DebugPlugin from PROD env
# RUN if [ "$ENV" = "prod" ]; \
# then rm -R /tmp/forums-plugins/DebugPlugin; \
# fi

# Copy the Filestack plugin
RUN git clone https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-filestack-plugin /tmp/forums-plugins/Filestack

#Copy the Groups plugin
RUN git clone https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-groups-plugin /tmp/forums-plugins/Groups

#Copy the SumoLogic plugin
RUN git clone https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-sumologic-plugin /tmp/forums-plugins/Sumologic

#Copy the TopcoderEditor plugin
RUN git clone https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-topcoder-editor-plugin /tmp/forums-plugins/TopcoderEditor

# Copy all plugins to the Vanilla plugins folder
RUN cp -r /tmp/forums-plugins/. /vanillapp/plugins

#Get the debug bar plugin
RUN wget https://us.v-cdn.net/5018160/uploads/addons/KSBIPJYMC0F2.zip
RUN unzip KSBIPJYMC0F2.zip
RUN cp -r debugbar /vanillapp/plugins
# Get the debug bar plugin
RUN if [ "$ENV" = "dev" ]; then \
wget https://us.v-cdn.net/5018160/uploads/addons/KSBIPJYMC0F2.zip; \
unzip KSBIPJYMC0F2.zip; \
cp -r debugbar /vanillapp/plugins; \
fi

# Install Topcoder dependencies
RUN composer install --working-dir /vanillapp/plugins/Topcoder
Expand All @@ -57,5 +68,17 @@ COPY ./vanilla/. /vanillapp/.
# Set permissions on config file
RUN chown application:application /vanillapp/conf/config.php
RUN chmod ug=rwx,o=rx /vanillapp/conf/config.php
# Clone the forum-theme repository
RUN git clone 'https://github.com/topcoder-platform/forums-theme.git' /vanillapp/themes/topcoder


# Tideways
RUN if [ "$ENV" = "dev" ]; then \
apt-get update && apt-get install -y gnupg2; \
echo 'deb https://packages.tideways.com/apt-packages debian main' > /etc/apt/sources.list.d/tideways.list && \
curl -L -sS 'https://packages.tideways.com/key.gpg' | apt-key add - && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install tideways-php && \
apt-get autoremove --assume-yes && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
echo 'extension=tideways.so\ntideways.connection=tcp://tideways-daemon:9135\ntideways.enable_cli=0\n' >> opt/docker/etc/php/php.ini; \
fi
7 changes: 6 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ set -eo pipefail
APP_NAME=$1
CI_DEPLOY_TOKEN=$2
ENV=$3
BRANCH=$4
UPDATE_CACHE=""
echo "" > vanilla.env
ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN docker-compose -f docker-compose.yml build $APP_NAME
if [ "$ENV" = "dev" ]; then
ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN BRANCH=$BRANCH docker-compose -f docker-compose.yml -f docker-compose.dev.yml build $APP_NAME
else
ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN BRANCH=$BRANCH docker-compose -f docker-compose.yml build $APP_NAME
fi
#docker create --name app $APP_NAME:latest
3 changes: 1 addition & 2 deletions config/vanilla/bootstrap.before.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,7 @@ function watchButton($categoryID) {
* @return bool return true if user has a permission
*/
function checkGroupPermission($userID,$groupID, $categoryID = null , $permissionCategoryID = null , $permission = null, $fullMatch = true) {
$groupModel = new GroupModel();
return $groupModel->checkPermission($userID,$groupID, $categoryID,$permissionCategoryID , $permission, $fullMatch);
return GroupModel::checkPermission($userID,$groupID, $categoryID,$permissionCategoryID , $permission, $fullMatch);
}
}

Expand Down
15 changes: 15 additions & 0 deletions config/vanilla/bootstrap.early.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,19 @@
Gdn::sql()->query($emptyAncestorQuery);
}

// FIX: https://github.com/topcoder-platform/forums/issues/449
if(!Gdn::structure()->tableExists('GroupInvitation')) {
// Group Invitation Table
Gdn::structure()->table('GroupInvitation')
->primaryKey('GroupInvitationID')
->column('GroupID', 'int', false, 'index')
->column('Token', 'varchar(32)', false, 'unique')
->column('InvitedByUserID', 'int', false, 'index')
->column('InviteeUserID', 'int', false, 'index')
->column('DateInserted', 'datetime', false, 'index')
->column('Status', ['pending', 'accepted', 'declined', 'deleted'])
->column('DateAccepted', 'datetime', true)
->column('DateExpires', 'datetime')
->set(false, false);
}
}
2 changes: 2 additions & 0 deletions config/vanilla/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@
$Configuration['Plugins']['Sumologic']['HttpSourceURL'] = '';
$Configuration['Plugins']['Sumologic']['BatchSize'] = 10;

// e.g. '+15 min', '+1 day'
$Configuration['Plugins']['Groups']['InviteExpiration']= '+20 min';

// RichEditor
$Configuration['RichEditor']['Quote']['Enable'] = true;
Expand Down
22 changes: 6 additions & 16 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
version: '3'
services:
mysql-local:
image: mysql
container_name: mysql-local
ports:
- 3306:3306
env_file:
- ./mysql.env
security_opt:
- seccomp:unconfined
command: --default-authentication-plugin=mysql_native_password
vanilla-forums:
links:
- mysql-local
- memcached-local
memcached-local:
image: memcached:1.5
container_name: memcached-local
- tideways-daemon
tideways-daemon:
container_name: tideways-daemon
build:
context: ./tideways-daemon
ports:
- "11211:11211"
- 9135:9135
21 changes: 21 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3'
services:
mysql-local:
image: mysql
container_name: mysql-local
ports:
- 3306:3306
env_file:
- ./mysql.env
security_opt:
- seccomp:unconfined
command: --default-authentication-plugin=mysql_native_password
vanilla-forums:
links:
- mysql-local
- memcached-local
memcached-local:
image: memcached:1.5
container_name: memcached-local
ports:
- "11211:11211"
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ services:
- ENV
- VANILLA_VERSION=3.3
- CI_DEPLOY_TOKEN
- BRANCH
ports:
- 80:80
20 changes: 20 additions & 0 deletions tideways-daemon/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM debian:stable-slim

ARG TIDEWAYS_ENVIRONMENT_DEFAULT=production
ENV TIDEWAYS_ENVIRONMENT=$TIDEWAYS_ENVIRONMENT_DEFAULT

RUN useradd --system tideways
RUN apt-get update && apt-get install -yq --no-install-recommends gnupg2 curl sudo ca-certificates

RUN echo 'deb https://packages.tideways.com/apt-packages debian main' > /etc/apt/sources.list.d/tideways.list && \
curl -L -sS 'https://packages.tideways.com/key.gpg' | apt-key add -
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq tideways-daemon && \
apt-get autoremove --assume-yes && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

EXPOSE 9135

USER tideways

ENTRYPOINT ["tideways-daemon","--hostname=tideways-daemon","--address=0.0.0.0:9135"]
Loading