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
Oliver Davies
February 02, 2021
Technology
0
850
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.3k
TDD - Test Driven Drupal
opdavies
0
4.1k
Building "Build Configs"
opdavies
0
500
Communities and contribution
opdavies
0
250
Working without Workspace
opdavies
0
290
Things you should know about PHP
opdavies
1
840
An Introduction to Mob Programming
opdavies
0
350
Deploying PHP applications with Ansible, Ansible Vault and Ansistrano
opdavies
0
6.5k
Other Decks in Technology
See All in Technology
レガシーで硬直したテーブル設計から変更容易で柔軟なテーブル設計にする
red_frasco
4
430
Progressive Deliveryで支える!スケールする衛星コンステレーションの地上システム運用 / Ground Station Operation for Scalable Satellite Constellation by Progressive Delivery
iselegant
1
210
[CV勉強会@関東 ICCV2025] WoTE: End-to-End Driving with Online Trajectory Evaluation via BEV World Model
shinkyoto
0
290
新しい風。SolidFlutterで実現するシンプルな状態管理
zozotech
PRO
0
130
AS59105におけるFreeBSD EtherIPの運用と課題
x86taka
0
210
OSだってコンテナしたい❗Image Modeが切り拓くLinux OS運用の新時代
tsukaman
0
110
国産クラウドを支える設計とチームの変遷 “技術・組織・ミッション”
kazeburo
4
5.6k
不確実性に備える ABEMA の信頼性設計とオブザーバビリティ基盤
nagapad
3
4.4k
重厚長大企業で、顧客価値をスケールさせるためのプロダクトづくりとプロダクト開発チームづくりの裏側 / Developers X Summit 2025
mongolyy
0
160
プロダクト負債と歩む持続可能なサービスを育てるための挑戦
sansantech
PRO
1
610
AI エージェントを評価するための温故知新と Spec Driven Evaluation
icoxfog417
PRO
2
530
Perlの生きのこり - YAPC::Fukuoka 2025
kfly8
0
580
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
Producing Creativity
orderedlist
PRO
348
40k
For a Future-Friendly Web
brad_frost
180
10k
BBQ
matthewcrist
89
9.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
What's in a price? How to price your products and services
michaelherold
246
12k
The World Runs on Bad Software
bkeepers
PRO
72
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Git: the NoSQL Database
bkeepers
PRO
432
66k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
The Cult of Friendly URLs
andyhume
79
6.7k
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