Skip to content

Instantly share code, notes, and snippets.

View stfsy's full-sized avatar
🎯
Focusing

Stefan Pfaffel stfsy

🎯
Focusing
  • Siemens
  • Nuremberg, Germany
  • 02:34 (UTC +02:00)
View GitHub Profile
@stfsy
stfsy / lints.yml
Created December 29, 2021 11:58
Simple opinionated GitHub Actions workflow for linting of Vue.js with TailwindCSS
name: lints
on: push
jobs:
js:
timeout-minutes: 10
name: javascript
runs-on: ubuntu-latest
steps:
@stfsy
stfsy / tests.yml
Created December 29, 2021 11:55
Simple opinionated GitHub Actions workflow for unit-testing of Vue.js with TailwindCSS
name: unit-tests
on: push
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
@stfsy
stfsy / e2e-tests.yml
Created December 29, 2021 11:55
Simple opinionated GitHub Actions workflow for end-to-end testing of Vue.js with TailwindCSS
name: e2e-tests
on: push
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
@stfsy
stfsy / .prettierrc.js
Created December 29, 2021 11:44
Simple opinionated Prettier configuration for Vue.js with TailwindCSS
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
resource "hcloud_volume" "volume" {
count = 3
name = "volume-${count.index}"
size = 10
location = "nbg1"
format = "xfs"
labels = {
"role" = "storage"
"environment" = "production"
}
@stfsy
stfsy / main.tf
Last active October 3, 2021 12:59
resource "hcloud_server" "server" {
image = "debian-10"
}
resource "null_resource" "server-setup" {
for_each = toset(var.commands)
provisioner "remote-exec" {
inline = [
"${each.key}"
resource "hcloud_server" "server" {
for_each = var.server_names
name = each.key
image = "debian-10"
labels = {
"role" = "frontend"
"environment" = "production"
}
}
module "what-active-users-exporter" {
source = "../../applications/what-active-users-exporter"
ipv4_address = hcloud_server.frontend.ipv4_address
listen_ivp4_address = var.ip
}
module "reboot" {
source = "../../commands/reboot"
ipv4_address = hcloud_server.frontend.ipv4_address
depends_on = [
@stfsy
stfsy / main.tf
Created September 30, 2021 19:57
resource "null_resource" "link-all-modules" {
provisioner "remote-exec" {
inline = [
"cd ${var.app_dir}/frontend && npm link ../${join(" ../", var.modules)} --only=production",
]
}
connection {
# omitted for brevity
}
@stfsy
stfsy / main.tf
Created September 30, 2021 19:54
resource "null_resource" "frontend-modules" {
for_each = toset(var.modules)
provisioner "file" {
source = "../blauspecht-frontend-${each.key}/"
destination = "${var.app_dir}/${each.key}/"
connection {
# omitted for brevity
}