something
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Prerequisites: user 'deploy' | |
| # dirs: | |
| # /var/www (owner deploy) | |
| # /var/repo (owner deploy) | |
| if [ $# -eq 0 ]; then | |
| echo "Error: Must provide repository name!" | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo groupadd deploy | |
| sudo useradd -m deploy -p deploy -g deploy | |
| sudo adduser deploy sudo | |
| ## Install docker and docker-compose | |
| ## https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04 | |
| ## https://docs.docker.com/compose/install/#install-compose | |
| sudo usermod -aG docker deploy | |
| ## Optionally: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| "baseUrl": "./", | |
| "paths": { | |
| "*": ["*"] | |
| } | |
| }, | |
| "exclude": [ | |
| "../node_modules" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "la-website nodemon", | |
| "runtimeExecutable": "${workspaceFolder}/la-website/node_modules/nodemon/bin/nodemon.js", | |
| "program": "${workspaceFolder}/la-website/src/server/index.js", | |
| "restart": true, |
It's not always things work as expected. There are a few ways to get help from k6 in order to find what happens while your script is running.
As is the case with JavaScript executed in the browser, k6 supports console.log and console.error functions. We can use them to output useful information or debug our script.
import http from "k6/http";
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { browser } from 'k6/experimental/browser'; | |
| import { check, sleep } from 'k6'; | |
| import http from "k6/http"; | |
| import { randomIntBetween } from 'https://jslib.k6.io/k6-utils/1.2.0/index.js'; | |
| const BASE_URL = 'https://quickpizza-k6-insights.grafana-dev.net' | |
| export const options = { | |
| cloud: { |