Commit 00651781 authored by Josh Zamor's avatar Josh Zamor
Browse files

#256, add fpm's logs to scalyr.

Also updated quick-up.sh to be a bit more flexible and robust.
parent 647559e0
Pipeline #116353944 passed with stages
in 28 minutes and 52 seconds
......@@ -15,6 +15,14 @@ build:
up:
./bin/quick-up.sh
.PHONY: prodtest-up
prodtest-up:
./bin/quick-up.sh "docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --scale s3-sync=0 --scale ftp-get=0"
.PHONY: prodtest-down
prodtest-down:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml down
.PHONY: dev-erd
dev-erd:
./bin/erd.sh
......
......@@ -21,7 +21,7 @@ if [ $PCMT_PIM_VOL != "$(docker volume ls -qf name=${PCMT_PIM_VOL})" ]; then
pcmt_profile='dev'
fi
PCMT_PROFILE=$pcmt_profile $DIR/quick-up.sh $DIR/../ddev.sh up -d
PCMT_PROFILE=$pcmt_profile $DIR/quick-up.sh "$DIR/../ddev.sh up -d"
source $DIR/wait-http.sh "http://localhost"
# install new assets
......
......@@ -5,17 +5,29 @@
# SPDX-License-Identifier: NPOSL-3.0
######################################################################
set -o errexit
set -o nounset
set -o pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
docker_cmd=${1:-'docker-compose'}
docker_cmd=${1:-'docker-compose up -d'}
profile=${PCMT_PROFILE:-'dev'}
secret_conf=${PCMT_SECRET_CONF:-'./conf/parameters.yml.dist'}
traefik_conf=${PCMT_TRAEFIK_CONF:-'./conf/traefik.toml.dist'}
pcmt_ver=${PCMT_VER:-"$("$DIR"/pcmt-ver-sha.sh)"}
pcmt_hostname=${PCMT_HOSTNAME:-'localhost'}
secret_conf=${PCMT_SECRET_CONF:-"$DIR/../conf/parameters.yml.dist"}
traefik_conf=${PCMT_TRAEFIK_CONF:-"$DIR/../conf/traefik.toml.dist"}
echo Starting PCMT with:
echo --- DOCKER COMMAND: $docker_cmd
echo --- PCMT_PROFILE: $profile
echo --- PCMT_SECRET_CONF: $secret_conf
echo --- PCMT_TRAEFIK_CONF: $traefik_conf
echo --- DOCKER COMMAND: "$docker_cmd"
echo --- PCMT_PROFILE: "$profile"
echo --- PCMT_VER: "$pcmt_ver"
echo --- PCMT_HOSTNAME: "$pcmt_hostname"
echo --- PCMT_SECRET_CONF: "$secret_conf"
echo --- PCMT_TRAEFIK_CONF: "$traefik_conf"
PCMT_PROFILE=$profile PCMT_SECRET_CONF=$secret_conf ${docker_cmd} up -d
\ No newline at end of file
PCMT_PROFILE="$profile" \
PCMT_VER="$pcmt_ver" \
PCMT_HOSTNAME="$pcmt_hostname" \
PCMT_SECRET_CONF="$secret_conf" \
$docker_cmd
\ No newline at end of file
{
"logs": [
{
"path": "/var/log/fpm/logs/dev.log"
},
{
"path": "/var/log/fpm/logs/prod.log"
}
]
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ services:
fpm:
volumes:
- 'ftp-get:/srv/pim/src/PcmtCoreBundle/Resources/E2OpenImport/work/'
- 'fpm-var:/srv/pim/var/'
mysql:
ports:
......@@ -60,6 +61,7 @@ services:
volumes:
- '/var/run/docker.sock:/var/scalyr/docker.sock'
- '/var/lib/docker/containers:/var/lib/docker/containers'
- 'fpm-var:/var/log/fpm/'
secrets:
- scalyr-creds
......@@ -68,6 +70,8 @@ volumes:
driver: local
ftp-get:
driver: local
fpm-var:
driver: local
secrets:
mysql-creds:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment