Skip to content
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
26 changes: 21 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ARG CI_DEPLOY_TOKEN
ARG VANILLA_VERSION=3.3
ARG ENV

# Environment Variables
ENV TIDEWAYS_SERVICE vanilla
ENV WEB_DOCUMENT_ROOT /vanillapp

# Get the latest release of Vanilla Forums
Expand All @@ -20,24 +22,24 @@ RUN git clone https://github.com/topcoder-platform/forums-plugins.git /tmp/forum
# Remove DebugPlugin from PROD env
# RUN if [ "$ENV" = "prod" ]; \
# then rm -R /tmp/forums-plugins/DebugPlugin; \
# fi
# 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
# 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
# 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
# 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
# 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
Expand All @@ -59,3 +61,17 @@ 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 apt-get update && apt-get install -y gnupg2
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 - && \
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/*

# For customization a placeholder /opt/docker/etc/php/php.ini is available which will be loaded as last configuration file.
# All settings can be overwritten in this ini file
RUN echo 'extension=tideways.so\ntideways.connection=tcp://tideways-daemon:9135\ntideways.enable_cli=0\n' >> opt/docker/etc/php/php.ini
10 changes: 9 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@ services:
- ENV
- VANILLA_VERSION=3.3
- CI_DEPLOY_TOKEN
links:
- tideways-daemon
ports:
- 80:80
- 80:80
tideways-daemon:
container_name: tideways-daemon
build:
context: ./tideways-daemon
ports:
- 9135:9135
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"]