Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dx: reproducible local env #257

Merged
merged 10 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:lts AS node
FROM hadolint/hadolint:latest-alpine AS hadolint
FROM ocaml/opam:debian-10-ocaml-4.14
FROM ocaml/opam:debian-12-ocaml-4.14

USER root

Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"dev",
"database-root",
"database-tenant"
// "adminer" // uncomment if adminer should run to see the database
"database-tenant",
"phpmyadmin" // uncomment if adminer should run to see the database
leostera marked this conversation as resolved.
Show resolved Hide resolved
],
"workspaceFolder": "/workspace",
"postCreateCommand": "/bin/bash .devcontainer/wait-for-database.sh -d db-root/test -d db-tenant/dev_zhaw -d db-tenant/test_econ .devcontainer/postCreate.sh",
Expand Down
11 changes: 11 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ services:
depends_on:
- database-root
- database-tenant

phpmyadmin:
image: phpmyadmin
restart: always
ports:
- 8082:80
environment:
- PMA_ARBITRARY=1
depends_on:
- database-root
- database-tenant

volumes:
opam:
Expand Down
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.sh text eol=lf
*.sh text eol=lf
esy.lock linguist-vendored linguist-generated
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ocamlbuild working directory
_esy/
_build/
public/
guardian/
Expand Down
1 change: 1 addition & 0 deletions .ocamlformat-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
esy.lock/**/*
7 changes: 0 additions & 7 deletions default.nix

This file was deleted.

136 changes: 136 additions & 0 deletions esy.json
leostera marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"dependencies": {
"@opam/alcotest-lwt": "*",
"@opam/canary": "*",
"@opam/caqti": "*",
"@opam/caqti-driver-mariadb": "*",
"@opam/caqti-lwt": "*",
"@opam/conf-libssl": "3",
"@opam/conformist": "0.8.1",
"@opam/containers": "3.12",
"@opam/containers-data": "3.12",
"@opam/cstruct": "*",
"@opam/dune": "*",
"@opam/guardian": "*",
"@opam/logs": "0.7.0",
"@opam/lwt": "5.7.0",
"@opam/lwt_ppx": "2.1.0",
"@opam/lwt_ssl": "1.2.0",
"@opam/mariadb": "*",
"@opam/ocaml-lsp-server": "*",
"@opam/ocamlformat": "0.26.1",
"@opam/mirage-crypto": "*",
"@opam/mirage-crypto-rng": "*",
"@opam/mirage-crypto-rng-lwt": "*",
"@opam/mirage-crypto-pk": "*",
"@opam/ppx_deriving": "5.2.1",
"@opam/ppx_inline_test": "*",
"@opam/ppx_sexp_conv": "v0.16.0",
"@opam/ppx_variants_conv": "v0.16.0",
"@opam/ppx_yojson_conv": "v0.16.0",
"@opam/sihl": "*",
"@opam/sihl-cache": "*",
"@opam/sihl-email": "*",
"@opam/sihl-queue": "*",
"@opam/sihl-storage": "*",
"@opam/sihl-token": "*",
"@opam/sihl-user": "*",
"esy-cmake": "*",
"esy-mariadb": "*",
"esy-openssl": "*",
"ocaml": "4.14.0"
},
"resolutions": {
"@opam/caqti-lwt": "paurkedal/ocaml-caqti:caqti-lwt.opam#cba1047b9e318bc450be72ab9dfb302aac8e4a78",
"@opam/canary": "uzh/canary#02cf40e029268560e160ca032850426e387aa598",
"@opam/comformist": "oxidizing/conformist#aa7b95d1f39215cdaab8cf96d765d63e41d5f8a6",
"@opam/guardian": "uzh/guardian#f144f2c12459e13365c8d6adc481556223dd87f9",
"@opam/letters": "oxidizing/letters#ab469208d008b32bd44f2385fdbee7bf24141172",
"@opam/sihl": "leostera/sihl:sihl.opam#ef4c89fd3d72fdf51caf30082cc55b7e7430b8f2",
"@opam/sihl-cache": "oxidizing/sihl:sihl-cache.opam#e0b304a4ebd3cb2ac0d21e0f6d151b9db301f9eb",
"@opam/sihl-email": "oxidizing/sihl:sihl-email.opam#e0b304a4ebd3cb2ac0d21e0f6d151b9db301f9eb",
"@opam/sihl-queue": "oxidizing/sihl:sihl-queue.opam#e0b304a4ebd3cb2ac0d21e0f6d151b9db301f9eb",
"@opam/sihl-storage": "oxidizing/sihl:sihl-storage.opam#e0b304a4ebd3cb2ac0d21e0f6d151b9db301f9eb",
"@opam/sihl-token": "oxidizing/sihl:sihl-token.opam#e0b304a4ebd3cb2ac0d21e0f6d151b9db301f9eb",
"@opam/sihl-user": "oxidizing/sihl:sihl-user.opam#e0b304a4ebd3cb2ac0d21e0f6d151b9db301f9eb",
"esy-openssl": "esy-packages/esy-openssl#619ae2d46ca981ec26ab3287487ad98b157a01d1",
"esy-mariadb": {
"source":"https://github.com/mariadb-corporation/mariadb-connector-c/archive/refs/tags/v3.3.7.tar.gz#sha256:029b91473a42f822611e92e01b7af05c3ed8def7ab14665ffbb78947ccf0d6a5",
"override": {
"buildEnv": {
"CFLAGS": "-I#{esy-openssl.install / 'include'} $CFLAGS",
"LDFLAGS": "-L#{esy-openssl.lib} -lcrypto $LDFLAGS"
},
"build": [
"cmake . -DCMAKE_C_FLAGS=-Wno-deprecated-non-prototype",
"make"
],
"buildsInSource": true,
"exportedEnv": {
"PKG_CONFIG_PATH": {
"scope": "global",
"val": "#{self.lib / 'pkgconfig'}"
},
"LDFLAGS": {
"scope": "global",
"val": "-L#{self.lib}"
},
"CPPFLAGS": {
"scope": "global",
"val": "-I#{self.install / 'include'}"
},
"LD_LIBRARY_PATH": {
"scope": "global",
"val": "#{self.lib}:$LD_LIBRARY_PATH"
},
"LIBRARY_PATH": {
"scope": "global",
"val": "#{self.lib}:$LIBRARY_PATH"
},
"CPATH": {
"scope": "global",
"val": "#{self.install / 'include'}:$CPATH"
},
"PATH": {
"scope": "global",
"val": "#{self.bin}:$PATH"
}
},
"dependencies": {
"esy-openssl": "*",
"esy-cmake": "*"
}
}
},
"@opam/mariadb": {
"version": "opam:1.1.6",
"override": {
"buildEnv": {
"C_INCLUDE_PATH": "#{@opam/ctypes.root / 'src' / 'ctypes'}:#{@opam/integers.root / 'src'}:$C_INCLUDE_PATH",
"CFLAGS": "-I#{esy-mariadb.root / 'include'} $CFLAGS",
"LDFLAGS": "-L #{@opam/ctypes.lib} -L#{esy-mariadb.root / 'libmariadb'} $LDFLAGS",
"LIBRARY_PATH": "#{esy-mariadb.root / 'libmariadb'}:$LIBRARY_PATH",
"DYLD_LIBRARY_PATH": "#{@opam/ctypes.lib / 'stublibs'}:$DYLD_LIBRARY_PATH",
"CAML_LD_LIBRARY_PATH": "#{@opam/ctypes.lib / 'stublibs'}:$CAML_LD_LIBRARY_PATH"
},
"build": [
"./configure --enable-lwt --prefix=$cur__install",
"ocaml setup.ml -build -tag thread"
],
"install": "ocaml setup.ml -install",
"dependencies": {
"esy-pkg-config": "*",
"@opam/stdlib-shims": "*",
"@opam/lwt": "5.7.0",
"@opam/ocamlbuild": "*",
"@opam/integers": "*",
"@opam/camlp-streams": "*",
"@opam/ctypes": "0.21.1",
"@opam/ctypes-foreign": "0.21.1",
"@opam/ocamlfind": "*",
"esy-mariadb": "*"
}
}
}
}
}
3 changes: 3 additions & 0 deletions esy.lock/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions esy.lock/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading