From 31ca22433fc8791ea8008d1361743cf0418e57b5 Mon Sep 17 00:00:00 2001 From: Olgierd Grzyb Date: Sun, 30 Oct 2016 02:50:25 +0200 Subject: [PATCH] Add Dockerfile --- Dockerfile | 15 +++++++++++++++ readme.md | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7cf7690 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM greyltc/archlinux +MAINTAINER Maciej Sobaczewski + +WORKDIR /usr/local/src + +RUN pacman -Syu --noconfirm php php-mcrypt php-intl nginx php-fpm php-gd php-sqlite composer nodejs npm +RUN npm i -g yarn + +COPY / /usr/local/src + +RUN yarn install +RUN composer install + +RUN node_modules/.bin/gulp assets +CMD ["php", "artisan", "serve", "--host=0.0.0.0"] diff --git a/readme.md b/readme.md index 8b464c9..0fbd82d 100644 --- a/readme.md +++ b/readme.md @@ -27,5 +27,26 @@ If you are more advanced user, read [installation chapter](http://docs.codice.eu the docs, so that you can build Codice from sources and install it step by step, having full control over the process. +## Development with Docker +First, get a working `.env` file (probably using SQLite, server-ish RDMBS not included). + +Build the container: + +```bash +docker build -t codice . +``` + +Start it, detached (so you don't need to open a second terminal/console to stop it later): + +```bash +docker run --publish 8000:8000 --name codice --detach codice +``` + +And navigate to http://localhost:8000/. After you finish work, shutdown the container: + +```bash +docker stop codice +``` + ## License The project is lincensed under MIT, check out [LICENSE](LICENSE.md) for more details.