Inspired By: grafana/loki#333
- docker-compose.yml
version: "3"
networks:
loki:
<?php | |
/** | |
* PHP 5.6 | |
*/ | |
class State | |
{ | |
const DRAFT = 'draft'; | |
const PUBLISHED = 'published'; |
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit | |
# Copyright (c) 2021-2025 Marat Reymers | |
## Golden config for golangci-lint v1.63.4 | |
# | |
# This is the best config for golangci-lint based on my experience and opinion. | |
# It is very strict, but not extremely strict. | |
# Feel free to adapt it to suit your needs. | |
# If this config helps you, please consider keeping a link to this file (see the next comment). |
# This is a sample build configuration for PHP. | |
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples. | |
# Only use spaces to indent your .yml configuration. | |
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
image: php:7.4-fpm | |
definitions: | |
services: | |
mysql: |
Inspired By: grafana/loki#333
version: "3"
networks:
loki:
pipelines: | |
pull-requests: | |
'**': | |
- step: | |
name: Build Testing | |
image: composer:latest | |
artifacts: | |
- "vendor/**" | |
script: | |
# Install php dependencies |
package util | |
import ( | |
"errors" | |
"fmt" | |
"net" | |
) | |
// useful links: | |
// https://stackoverflow.com/questions/27410764/dial-with-a-specific-address-interface-golang |
#!/bin/bash | |
apt-get -y update | |
cat > /tmp/subscript.sh << EOF | |
# START UBUNTU USERSPACE | |
echo "Setting up NodeJS Environment" | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash | |
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc | |
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc | |
# Dot source the files to ensure that variables are available within the current shell | |
. /home/ubuntu/.nvm/nvm.sh |
#Add ENV strings into AWS Parameter Store (as one parameter). All strings will be separated by the newline | |
#We are getting ENV string separated by the newline and pub them in the dotenv | |
aws ssm get-parameter --name Param-with-env --region eu-west-1 --query Parameter.Value | sed -e 's/^"//' -e 's/"$//' | awk '{gsub(/\\n/,"\n")}1' >> .env |
Info: https://www.nginx.com/resources/admin-guide/nginx-https-upstreams/
Source: http://nategood.com/client-side-certificate-authentication-in-ngi
This is SSL, so you'll need an cert-key pair for you/the server, the api users/the client and a CA pair. You will be the CA in this case (usually a role played by VeriSign, thawte, GoDaddy, etc.), signing your client's certs. There are plenty of tutorials out there on creating and signing certificates, so I'll leave the details on this to someone else and just quickly show a sample here to give a complete tutorial. NOTE: This is just a quick sample of creating certs and not intended for production.
<?php | |
/*----------------------------- | |
* Athena SELECT Query Sample Program | |
* | |
* - IAM でユーザ作成必要 | |
* 必要な管理ポリシー : AmazonAthenaFullAccess | |
* - 作ったIAMユーザのクレデンシャル情報を aws configure で設定必要 | |
* - AWS SDK for PHP version 3 のインストールが必要 | |
* | |
* @date 2017/08/06 |