From f1f1a586b2da2ceae790e47090ba4891939fc657 Mon Sep 17 00:00:00 2001 From: Michael Fliegner Date: Tue, 4 Jun 2024 12:47:24 +0200 Subject: [PATCH] codespaces --- .devcontainer/devcontainer.json | 16 ++++++++++++++++ .devcontainer/postCreateCommand.sh | 12 ++++++++++++ .devcontainer/postStartCommand.sh | 4 ++++ 3 files changed, 32 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/postCreateCommand.sh create mode 100755 .devcontainer/postStartCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..91f68e3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": { + "ghcr.io/devcontainers-contrib/features/postgres-asdf:1": { + "version": "latest" + }, + "ghcr.io/julialang/devcontainer-features/julia:1": { + "channel": "release" + }, + "ghcr.io/robbert229/devcontainer-features/postgresql-client:1": { + "version": "13" + } + }, + "postCreateCommand": "/bin/sh -c ./.devcontainer/postCreateCommand.sh", + "postStartCommand": "/bin/sh -c ./.devcontainer/postStartCommand.sh" +} diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 0000000..04c0a6b --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +julia -e "using Pkg; Pkg.add(\"IJulia\")" + +mkdir ~/.julia/config +cat << EOF > ~/.julia/config/startup.jl +ENV["GENIE_DEV"] = "dev" +ENV["SEARCHLIGHT_USERNAME"] = "postgres" +ENV["SEARCHLIGHT_PASSWORD"] = "postgres" +EOF + diff --git a/.devcontainer/postStartCommand.sh b/.devcontainer/postStartCommand.sh new file mode 100755 index 0000000..c060099 --- /dev/null +++ b/.devcontainer/postStartCommand.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -e + +pg_ctl start