Skip to content

Commit e21d142

Browse files
authored
Merge pull request #417 from topcoder-platform/issues-381
Added Tideways
2 parents 1ad9819 + 1c2279f commit e21d142

File tree

3 files changed

+50
-6
lines changed

3 files changed

+50
-6
lines changed

Dockerfile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ARG CI_DEPLOY_TOKEN
44
ARG VANILLA_VERSION=3.3
55
ARG ENV
66

7+
# Environment Variables
8+
ENV TIDEWAYS_SERVICE vanilla
79
ENV WEB_DOCUMENT_ROOT /vanillapp
810

911
# Get the latest release of Vanilla Forums
@@ -20,24 +22,24 @@ RUN git clone https://github.com/topcoder-platform/forums-plugins.git /tmp/forum
2022
# Remove DebugPlugin from PROD env
2123
# RUN if [ "$ENV" = "prod" ]; \
2224
# then rm -R /tmp/forums-plugins/DebugPlugin; \
23-
# fi
25+
# fi
2426

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

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

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

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

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

40-
#Get the debug bar plugin
42+
# Get the debug bar plugin
4143
RUN wget https://us.v-cdn.net/5018160/uploads/addons/KSBIPJYMC0F2.zip
4244
RUN unzip KSBIPJYMC0F2.zip
4345
RUN cp -r debugbar /vanillapp/plugins
@@ -59,3 +61,17 @@ RUN chown application:application /vanillapp/conf/config.php
5961
RUN chmod ug=rwx,o=rx /vanillapp/conf/config.php
6062
# Clone the forum-theme repository
6163
RUN git clone 'https://github.com/topcoder-platform/forums-theme.git' /vanillapp/themes/topcoder
64+
65+
# Tideways
66+
RUN apt-get update && apt-get install -y gnupg2
67+
RUN echo 'deb https://packages.tideways.com/apt-packages debian main' > /etc/apt/sources.list.d/tideways.list && \
68+
curl -L -sS 'https://packages.tideways.com/key.gpg' | apt-key add - && \
69+
apt-get update && \
70+
DEBIAN_FRONTEND=noninteractive apt-get -yq install tideways-php && \
71+
apt-get autoremove --assume-yes && \
72+
apt-get clean && \
73+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
74+
75+
# For customization a placeholder /opt/docker/etc/php/php.ini is available which will be loaded as last configuration file.
76+
# All settings can be overwritten in this ini file
77+
RUN echo 'extension=tideways.so\ntideways.connection=tcp://tideways-daemon:9135\ntideways.enable_cli=0\n' >> opt/docker/etc/php/php.ini

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,13 @@ services:
1111
- ENV
1212
- VANILLA_VERSION=3.3
1313
- CI_DEPLOY_TOKEN
14+
links:
15+
- tideways-daemon
1416
ports:
15-
- 80:80
17+
- 80:80
18+
tideways-daemon:
19+
container_name: tideways-daemon
20+
build:
21+
context: ./tideways-daemon
22+
ports:
23+
- 9135:9135

tideways-daemon/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM debian:stable-slim
2+
3+
ARG TIDEWAYS_ENVIRONMENT_DEFAULT=production
4+
ENV TIDEWAYS_ENVIRONMENT=$TIDEWAYS_ENVIRONMENT_DEFAULT
5+
6+
RUN useradd --system tideways
7+
RUN apt-get update && apt-get install -yq --no-install-recommends gnupg2 curl sudo ca-certificates
8+
9+
RUN echo 'deb https://packages.tideways.com/apt-packages debian main' > /etc/apt/sources.list.d/tideways.list && \
10+
curl -L -sS 'https://packages.tideways.com/key.gpg' | apt-key add -
11+
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq tideways-daemon && \
12+
apt-get autoremove --assume-yes && \
13+
apt-get clean && \
14+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
15+
16+
EXPOSE 9135
17+
18+
USER tideways
19+
20+
ENTRYPOINT ["tideways-daemon","--hostname=tideways-daemon","--address=0.0.0.0:9135"]

0 commit comments

Comments
 (0)