From 27f1780f6f75c777560d80cd83d0b134f4a27f23 Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas@jonasled.de>
Date: Fri, 10 Sep 2021 18:46:58 +0000
Subject: [PATCH] setup devcontainer

---
 .devcontainer/Dockerfile        | 7 +++++++
 .devcontainer/devcontainer.json | 7 +++++++
 package.json                    | 2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 .devcontainer/Dockerfile
 create mode 100644 .devcontainer/devcontainer.json

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 0000000..b7b6373
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,7 @@
+FROM alpine:latest
+RUN apk update && \
+    apk upgrade && \
+    apk add nodejs yarn php8 php8-mysqli php8-mbstring git nano && \
+    echo "alias php=php8" >> /etc/profile
+
+ENV ENV="/etc/profile"
\ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000..0c76013
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,7 @@
+{
+    "dockerFile": "Dockerfile",
+	"extensions": [	],
+    "forwardPorts": [
+        1234
+    ]
+}
diff --git a/package.json b/package.json
index e744d50..4fdec86 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
     "compile": "concurrently \"yarn css\" \"yarn js\"",
     "css": "sass scss/:public/css --style=compressed --no-source-map",
     "js": "webpack --config ./webpack.conf.js",
-    "watch": "concurrently \"sass --watch --style compressed scss/:public/css\" \"cd public && php -S localhost:1234\" \"webpack --config ./webpack.conf.js --mode development --watch\""
+    "watch": "concurrently \"sass --watch --style compressed scss/:public/css\" \"cd public && php8 -S localhost:1234\" \"webpack --config ./webpack.conf.js --mode development --watch\""
   },
   "devDependencies": {
     "concurrently": "^6.0.0",
-- 
GitLab