diff options
author | Michiel Schuurmans <michielschuurmans@gmail.com> | 2020-10-28 20:33:36 +0100 |
---|---|---|
committer | Michiel Schuurmans <michielschuurmans@gmail.com> | 2020-10-28 20:33:36 +0100 |
commit | b1594cc70fc188fbd915f843b760601a3fa9bd11 (patch) | |
tree | 794dc202368f9a37a5845c60fbba486d190cae3a | |
parent | ddf60b54720847e924f1fbb152b2cdf2f2b80105 (diff) |
Signed-off-by: Michiel Schuurmans <michielschuurmans@gmail.com>
-rw-r--r-- | api/Dockerfile | 13 | ||||
-rwxr-xr-x | scripts/package | 7 | ||||
-rw-r--r-- | web/Dockerfile | 2 |
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/ |