Docker dev environment (#90)
This commit is contained in:
parent
6198b4925d
commit
04c1b1d307
18
.env.example
18
.env.example
|
|
@ -2,19 +2,19 @@ APP_ENV=production
|
|||
APP_DEBUG=false
|
||||
APP_URL=
|
||||
APP_CIPHER=rijndael-128
|
||||
APP_KEY=SomeRandomString
|
||||
APP_KEY=
|
||||
APP_TIMEZONE
|
||||
|
||||
DB_TYPE=mysql
|
||||
DB_HOST=localhost
|
||||
DB_TYPE=pgsql
|
||||
DB_HOST=db
|
||||
DB_DATABASE=attendize
|
||||
DB_USERNAME=
|
||||
DB_PASSWORD=
|
||||
DB_USERNAME=attendize
|
||||
DB_PASSWORD=attendize
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_PORT=587
|
||||
MAIL_ENCRYPTION=tls
|
||||
MAIL_HOST=
|
||||
MAIL_PORT=25
|
||||
MAIL_ENCRYPTION=
|
||||
MAIL_HOST=maildev
|
||||
MAIL_FROM_ADDRESS=
|
||||
MAIL_FROM_NAME=
|
||||
MAIL_PASSWORD=
|
||||
|
|
@ -24,4 +24,4 @@ GOOGLE_ANALYTICS_ID=
|
|||
|
||||
TWITTER_WIDGET_ID=
|
||||
|
||||
LOG=single
|
||||
LOG=errorlog
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
FROM nginx:latest
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
FROM php:fpm
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpq-dev \
|
||||
libmcrypt-dev \
|
||||
libpng12-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libfreetype6-dev \
|
||||
libxrender1 \
|
||||
libfontconfig \
|
||||
libxext-dev \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||
&& docker-php-ext-install -j$(nproc) pdo_pgsql pgsql mcrypt gd zip
|
||||
WORKDIR /usr/share/nginx/html/attendize
|
||||
|
|
@ -107,7 +107,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'log' => 'daily',
|
||||
'log' => env('LOG', 'daily'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
web:
|
||||
build: .
|
||||
dockerfile: Dockerfile-nginx
|
||||
ports:
|
||||
- "8080:80"
|
||||
links:
|
||||
- php
|
||||
volumes:
|
||||
- .:/usr/share/nginx/html/attendize
|
||||
php:
|
||||
build: .
|
||||
dockerfile: Dockerfile-php
|
||||
links:
|
||||
- db
|
||||
- maildev
|
||||
volumes:
|
||||
- .:/usr/share/nginx/html/attendize
|
||||
db:
|
||||
image: postgres
|
||||
environment:
|
||||
- POSTGRES_USER=attendize
|
||||
- POSTGRES_PASSWORD=attendize
|
||||
- POSTGRES_DB=attendize
|
||||
ports:
|
||||
- "5433:5432"
|
||||
volumes:
|
||||
- ./docker/pgdata:/var/lib/postgresql/data
|
||||
maildev:
|
||||
image: djfarrelly/maildev
|
||||
ports:
|
||||
- "1080:80"
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
server {
|
||||
listen 80 default_server;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html/attendize/public;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
}
|
||||
18
readme.md
18
readme.md
|
|
@ -57,6 +57,24 @@ Limited Documentation available at https://www.attendize.com/documentation.php.
|
|||
|
||||
Feel free to fork and contribute. I could use the help!
|
||||
|
||||
## Docker dev environment
|
||||
|
||||
To run a docker dev entionment do the following:
|
||||
|
||||
```
|
||||
git clone https://github.com/Attendize/Attendize
|
||||
cd Attendize
|
||||
cp .env.example .env
|
||||
docker-compose build
|
||||
docker run --rm -v $(pwd):/app composer/composer install
|
||||
docker-compose up
|
||||
docker-compose run php php artisan attendize:install
|
||||
chmod a+w -R storage
|
||||
chmod a+w -R public/user_content
|
||||
```
|
||||
|
||||
Attendize will be available at `http://localhost:8080` and maildev at `http://localhost:1080`
|
||||
|
||||
## License
|
||||
|
||||
Attendize is open-sourced software licensed under the Attribution Assurance License
|
||||
|
|
|
|||
Loading…
Reference in New Issue