Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Working with Workspace
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Oliver Davies
February 02, 2021
Technology
0
870
Working with Workspace
https://www.oliverdavies.uk/talks/working-with-workspace
Oliver Davies
February 02, 2021
Tweet
Share
More Decks by Oliver Davies
See All by Oliver Davies
Building Static Websites with Sculpin
opdavies
0
1.7k
Taking Flight with Tailwind CSS
opdavies
0
5.5k
TDD - Test Driven Drupal
opdavies
0
4.2k
Building "Build Configs"
opdavies
0
540
Communities and contribution
opdavies
0
270
Working without Workspace
opdavies
0
320
Things you should know about PHP
opdavies
1
860
An Introduction to Mob Programming
opdavies
0
380
Deploying PHP applications with Ansible, Ansible Vault and Ansistrano
opdavies
0
6.5k
Other Decks in Technology
See All in Technology
全員が「作り手」になる。職能の壁を溶かすプロトタイプ開発。
hokuo
1
660
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
0
270
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
250
AIとともに歩む情報セキュリティ / Information Security with AI
kanny
4
3k
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
120
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
1
340
Amazon Bedrock AgentCore EvaluationsでAIエージェントを評価してみよう!
yuu551
0
210
日本語テキストと音楽の対照学習の技術とその応用
lycorptech_jp
PRO
1
400
GCASアップデート(202510-202601)
techniczna
0
240
エンジニアとマネジメントの距離/Engineering and Management
ikuodanaka
3
700
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
890
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
120
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
1.9k
Paper Plane (Part 1)
katiecoart
PRO
0
3.8k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
130
Automating Front-end Workflow
addyosmani
1371
200k
The SEO Collaboration Effect
kristinabergwall1
0
350
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
150
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Skip the Path - Find Your Career Trail
mkilby
0
51
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Transcript
Working with Workspace Oliver Davies, Inviqa
What is Workspace? • A tool that we use and
maintain at Inviqa • Primarily for building and managing Docker Compose environments • Built on Symfony • Create custom commands for your project environments • Alternative to a bash script or a Makefile • And more... @opdavies
Features • Commands • Functions • Attributes • Encrypting/decrypting secrets
• Generating configuration files • Global services: logging, mail, proxy @opdavies
Installation # Download from GitHub. wget https://github.com/my127/workspace/releases/download/0.1.3/ws # Make it
executable. chmod +x ws # Make it accessible. mv ws /usr/local/bin @opdavies
@opdavies
Replacing your Makefile @opdavies
Running simple commands 1 # workspace.yml 2 3 workspace('oliverdavies-uk'): 4
description: My personal website codebase. 5 6 command('say-hello'): 7 #!bash 8 echo 'Hello world' 9 10 command('say-hello'): 11 #!php 12 echo 'Hello World'; @opdavies
@opdavies
'run' vs. 'passthru' command('say-hello'): #!bash run echo 'Hello World' passthru
echo 'Hello World' @opdavies
Attributes 1 attribute('message'): Hello World! 2 3 command('say-hello'): | 4
#!bash|@ 5 echo @('message') @opdavies
Arguments 1 command('say-hello <name>'): | 2 #!bash|= 3 echo ={
@('message') } from ={ input.argument('name') } @opdavies
Environment variables 1 command('say-hello <name>'): 2 env: 3 MESSAGE: =
@('message') 4 NAME: = input.argument('name') 5 exec: | 6 #!bash|= 7 echo "$MESSAGE from $NAME" @opdavies
Managing secrets # ws secret generate-random-key key('default'): 'd38be3b7aa42fdbfb14c0d25f07bc1875edd5f13f640cd76' # ws
secret encrypt 'Hello World!' attribute('message'): = decrypt('YTozOntpOjA7czo3OiJkZWZhdWx0Ijt') command('say-hello'): | #!bash|@ echo @('message') @opdavies
Example: building slides from rst2pdf @opdavies
Attributes attributes: rst2pdf: command: | = 'rst2pdf ' ~ @('rst2pdf.filename.rst')
~ ' --break-level 1 --stylesheets main --fit-background-mode scale --extension-module preprocess --output ' ~ @('rst2pdf.filename.pdf') filename: pdf: slides.pdf rst: slides.rst thumbnail: filename: thumbnail.png @opdavies
Generating PDFs command('pdf generate <talk>'): | #!bash|= cd ={ input.argument('talk')
} passthru ={ @('rst2pdf.command') } command('pdf watch <talk>'): | #!bash|= cd ={ input.argument('talk') } passthru nodemon -e rst,style,txt -x "={ @('rst2pdf.command') }" @opdavies
Generating thumbnails command('thumbnail <talk>'): env: PDF_FILENAME: = @('rst2pdf.filename.pdf') THUMBNAIL_FILENAME: =
@('thumbnail.filename') exec: | #!bash|= cd ={ input.argument('talk') } passthru gs -sDEVICE=png16m -r300 -dDownScaleFactor=4 -sOutputFile=$THUMBNAIL_FILENAME -dLastPage=1 $PDF_FILENAME @opdavies
Configuration files @opdavies
Using confd 1 attributes: 2 drupal: 3 docroot: web 4
5 command('apply config'): | 6 #!php 7 $ws->confd('workspace:/confd')->apply(); 8 9 confd('workspace:/confd'): 10 - src: 'vhost.conf' 11 dst: 'workspace:/.my127ws/docker/nginx/default.conf' @opdavies
vhost.conf.twig The source file. 1 server { 2 server_name _;
3 root /app/{{ @('drupal.docroot' )}}; 4 @opdavies
default.conf The generated file. 1 server { 2 server_name _;
3 root /app/web; 4 @opdavies
Demo: "Workspacing" my site @opdavies
Thanks! References: • https://github.com/my127/workspace • https://oliverdavies.link/workspace-demo • https://oliverdavies.link/workspacing-site Me: •
https://www.oliverdavies.uk @opdavies