summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/Dockerfile13
-rwxr-xr-xscripts/package7
-rw-r--r--web/Dockerfile2
3 files changed, 22 insertions, 0 deletions
diff --git a/api/Dockerfile b/api/Dockerfile
new file mode 100644
index 0000000..f7a8bd0
--- /dev/null
+++ b/api/Dockerfile
@@ -0,0 +1,13 @@
+FROM php:7.4-cli
+RUN apt-get update -y && apt-get install -y openssl zip unzip git libpq-dev
+RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
+RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql
+RUN docker-php-ext-install pdo pdo_pgsql
+
+WORKDIR /app
+COPY . /app
+RUN rm /app/.env
+RUN composer install
+
+CMD cd /app && php -S 0.0.0.0:8000 -t public
+EXPOSE 8000
diff --git a/scripts/package b/scripts/package
new file mode 100755
index 0000000..3d83394
--- /dev/null
+++ b/scripts/package
@@ -0,0 +1,7 @@
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/.."
+
+cd $DIR/web
+sudo docker build -t mschuurmans/blender-web:$1 .
+
+cd $DIR/api
+sudo docker build -t mschuurmans/blender-api:$1 .
diff --git a/web/Dockerfile b/web/Dockerfile
new file mode 100644
index 0000000..ac8f3ac
--- /dev/null
+++ b/web/Dockerfile
@@ -0,0 +1,2 @@
+FROM httpd
+copy ./dist /usr/local/apache2/htdocs/