File tree Expand file tree Collapse file tree 5 files changed +14
-15
lines changed Expand file tree Collapse file tree 5 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ builddeploy_steps: &builddeploy_steps
29
29
- run : *install_dependency
30
30
- run : *install_deploysuite
31
31
# - restore_cache: *restore_cache_settings_for_build
32
- - run : ./build.sh ${APPNAME} ${CI_DEPLOY_TOKEN} ${LOGICAL_ENV} ${BRANCH}
32
+ - run : ./build.sh ${APPNAME} ${CI_DEPLOY_TOKEN} ${LOGICAL_ENV} ${BRANCH} ${TIDEWAYS_ENVIRONMENT}
33
33
# - save_cache: *save_cache_settings
34
34
- deploy :
35
35
name : Running MasterScript.
52
52
APPNAME : " vanilla-forums"
53
53
CI_DEPLOY_TOKEN : $CI_DEPLOY_TOKEN
54
54
BRANCH : " develop"
55
+ TIDEWAYS_ENV : " dev"
55
56
steps : *builddeploy_steps
56
57
57
58
" build-prod " :
62
63
APPNAME : " vanilla-forums"
63
64
CI_DEPLOY_TOKEN : $CI_DEPLOY_TOKEN
64
65
BRANCH : " master"
66
+ TIDEWAYS_ENV : " production"
65
67
steps : *builddeploy_steps
66
68
67
69
workflows :
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ARG VANILLA_VERSION=3.3
5
5
ARG ENV
6
6
ARG BRANCH
7
7
8
- ENV TIDEWAYS_SERVICE vanilla
8
+ ENV TIDEWAYS_SERVICE web
9
9
ENV WEB_DOCUMENT_ROOT /vanillapp
10
10
11
11
# Get the latest release of Vanilla Forums
@@ -69,19 +69,16 @@ COPY ./vanilla/. /vanillapp/.
69
69
RUN chown application:application /vanillapp/conf/config.php
70
70
RUN chmod ug=rwx,o=rx /vanillapp/conf/config.php
71
71
72
-
73
72
# Tideways
74
- RUN if [ "$ENV" = "dev" ]; then \
75
- apt-get update && apt-get install -y gnupg2; \
76
- echo 'deb https://packages.tideways.com/apt-packages debian main' > /etc/apt/sources.list.d/tideways.list && \
73
+ RUN apt-get update && apt-get install -yq --no-install-recommends gnupg2;
74
+ RUN echo 'deb https://packages.tideways.com/apt-packages debian main' > /etc/apt/sources.list.d/tideways.list && \
77
75
curl -L -sS 'https://packages.tideways.com/key.gpg' | apt-key add - && \
78
76
apt-get update && \
79
77
DEBIAN_FRONTEND=noninteractive apt-get -yq install tideways-php && \
80
78
apt-get autoremove --assume-yes && \
81
79
apt-get clean && \
82
80
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
83
- echo 'extension=tideways.so\n tideways.connection=tcp://tideways-daemon:9135\n tideways.enable_cli=0\n ' >> opt/docker/etc/php/php.ini; \
84
- fi
81
+ echo 'extension=tideways.so\n tideways.connection=tcp://tideways-daemon:9135\n tideways.enable_cli=0\n tideways.sample_rate=25' >> opt/docker/etc/php/php.ini;
85
82
86
83
# Copy custom supervisor's configs and scripts
87
84
# Netcat is used to connect to a memcached server
Original file line number Diff line number Diff line change @@ -4,11 +4,8 @@ APP_NAME=$1
4
4
CI_DEPLOY_TOKEN=$2
5
5
ENV=$3
6
6
BRANCH=$4
7
+ TIDEWAYS_ENV=$5
7
8
UPDATE_CACHE=" "
8
9
echo " " > vanilla.env
9
- if [ " $ENV " = " dev" ]; then
10
- ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN BRANCH=$BRANCH docker-compose -f docker-compose.yml -f docker-compose.dev.yml build $APP_NAME
11
- else
12
- ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN BRANCH=$BRANCH docker-compose -f docker-compose.yml build $APP_NAME
13
- fi
10
+ ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN BRANCH=$BRANCH TIDEWAYS_ENV=$TIDEWAYS_ENV docker-compose -f docker-compose.yml -f docker-compose.dev.yml build $APP_NAME
14
11
# docker create --name app $APP_NAME:latest
Original file line number Diff line number Diff line change @@ -7,5 +7,7 @@ services:
7
7
container_name : tideways-daemon
8
8
build :
9
9
context : ./tideways-daemon
10
+ args :
11
+ - TIDEWAYS_ENV
10
12
ports :
11
13
- 9135:9135
Original file line number Diff line number Diff line change 1
1
FROM debian:stable-slim
2
2
3
- ARG TIDEWAYS_ENVIRONMENT_DEFAULT=production
4
- ENV TIDEWAYS_ENVIRONMENT=$TIDEWAYS_ENVIRONMENT_DEFAULT
3
+ ARG TIDEWAYS_ENV
4
+ ENV TIDEWAYS_ENVIRONMENT=$TIDEWAYS_ENV
5
+ RUN echo "Tideways Daemon container for '$TIDEWAYS_ENV' env"
5
6
6
7
RUN useradd --system tideways
7
8
RUN apt-get update && apt-get install -yq --no-install-recommends gnupg2 curl sudo ca-certificates
You can’t perform that action at this time.
0 commit comments