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
# .voyage/config.yml | |
services: | |
app: | |
context: ./ | |
primary: true | |
exposePort: 5000 | |
environment: | |
- name: APP_ENV | |
value: voyage | |
- name: DB_HOST |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello_world(): | |
return "<p>Hello, World!</p>" |
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
FROM voyageapp/node:17.6-alpine as node | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm ci | |
COPY . . | |
RUN npm run css | |
FROM python:3.8-alpine |
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
# Install NVM | |
# https://github.com/nvm-sh/nvm#install--update-script | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash | |
# Install Docker | |
# https://docs.docker.com/engine/install/ubuntu/ | |
sudo apt-get update -y && \ | |
sudo apt-get install -y \ | |
ca-certificates \ | |
curl \ |
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
{ | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"$ref": "#/definitions/Welcome6", | |
"definitions": { | |
"Welcome6": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"k8s": { | |
"$ref": "#/definitions/K8S" |
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 | |
# Add this script to instance metadata and reboot | |
# gcloud compute instances add-metadata INSTANCE_NAME --metadata-from-file startup-script=gcp_idle_vm.sh | |
# To follow logs sudo journalctl -f -u google-startup-scripts.service | |
# For this to work ensure your vm is private or has appropriate firewall rules | |
# otherwise brute force attacks will keep your vm alive | |
has_connection_existed=false | |
idle_count=0 |
OlderNewer