File tree 6 files changed +48
-23
lines changed
6 files changed +48
-23
lines changed Original file line number Diff line number Diff line change 4
4
[ ![ Coverage Status] ( https://coveralls.io/repos/github/phpsrbija/unfinished/badge.svg )] ( https://coveralls.io/github/phpsrbija/unfinished )
5
5
[ ![ Scrutinizer Quality Score] ( https://scrutinizer-ci.com/g/phpsrbija/unfinished/badges/quality-score.png?s=4023c984fc1163a44f4220cd7d57406643ced9f2 )] ( https://scrutinizer-ci.com/g/phpsrbija/unfinished/ )
6
6
7
- ## Instalation
7
+ ## Installation
8
+
9
+ ### Vagrant (Recommended)
8
10
9
11
```
10
12
git clone https://github.com/phpsrbija/unfinished.git
@@ -21,6 +23,23 @@ Admin is at http://unfinished.test/admin
21
23
22
24
pass: testtest
23
25
26
+ ### Docker
27
+
28
+ ```
29
+ git clone https://github.com/phpsrbija/unfinished.git
30
+ cd unfinished
31
+ docker-compose up
32
+ docker-compose run php composer install
33
+ docker-compose run php bin/setup-db.sh docker
34
+
35
+ ```
36
+
37
+ Open in your browser http://localhost and voila!
38
+
39
+ Admin is at http://localhost/admin
40
+
41
+ pass: testtest
42
+
24
43
## Our main philosophy of software architecture
25
44
26
45
Packages, packages and packages...
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
+ MODE=$1 ;
3
+ if [ " $MODE " != " docker" ]; then
4
+ MODE=" vagrant"
5
+ fi
2
6
3
7
echo "
4
8
────────────────────────────────────────────────────────────────────────────────────────────────────────
11
15
if [ ! -f /var/www/unfinished/config/autoload/local.php ]; then
12
16
cp /var/www/unfinished/config/autoload/local.php.dist /var/www/unfinished/config/autoload/local.php
13
17
fi
18
+ if [ " $MODE " = " docker" ]; then
19
+ sed -i -e ' s/localhost/mysql/g' /var/www/unfinished/data/phinx/phinx.php
20
+ sed -i -e ' s/root/unfinished/g' /var/www/unfinished/data/phinx/phinx.php
21
+
22
+ sed -i -e ' s/host=localhost/host=mysql/g' /var/www/unfinished/config/autoload/local.php
23
+ sed -i -e " s/'username' => 'root'/'username' => 'unfinished'/g" /var/www/unfinished/config/autoload/local.php
24
+ fi
14
25
15
26
echo "
16
27
────────────────────────────────────────────────────────────────────────────────────────────────────────
Original file line number Diff line number Diff line change @@ -7,22 +7,23 @@ services:
7
7
volumes_from :
8
8
- app
9
9
php :
10
- # restart: always
11
- build : ./docker/php7.0-fpm/
12
- # #build: .
13
- # restart: always
14
- # image: phpdockerio/php7-fpm
10
+ build :
11
+ context : ./docker/php7.0-fpm
12
+ dockerfile : ./Dockerfile
15
13
expose :
16
14
- 9000
17
15
volumes_from :
18
16
- app
17
+ tty : true
18
+ working_dir : /var/www/unfinished
19
19
app :
20
- image : phpdockerio/php7-fpm
20
+ build :
21
+ context : ./docker/app
22
+ dockerfile : ./Dockerfile
21
23
volumes :
22
24
- ./application:/var/www/unfinished
23
25
command : " true"
24
26
mysql :
25
- # build: ./mysql/
26
27
image : mysql:latest
27
28
volumes_from :
28
29
- data
@@ -47,4 +48,3 @@ services:
47
48
image : redis
48
49
expose :
49
50
- 6379
50
- # command: "start"
Original file line number Diff line number Diff line change
1
+ FROM phpdockerio/php7-fpm
Original file line number Diff line number Diff line change 1
1
FROM mysql:latest
2
2
COPY ./mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf
3
-
4
- # add to your machine
5
- # RUN mysql -u root -psecret -e 'create database pulsonlinepulsar_testing;'
6
- # RUN cat /etc/mysql/mysql.conf.d/mysqld.cnf
Original file line number Diff line number Diff line change 1
1
FROM phpdockerio/php7-fpm
2
- # COPY ./www.conf /etc/php5/fpm/pool.d/www.conf
3
2
4
- WORKDIR /var/www/unfinished
3
+ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
5
4
6
5
# Install dependencies
7
- RUN apt-get update && \
8
- apt-get -y install curl \
6
+ RUN apt-get update \
7
+ && \
8
+ apt-get install -y -o Dpkg::Options::=--force-confdef \
9
9
vim \
10
- php7.0-xdebug \
11
10
php7.0-mysql \
12
- php7.0-mbstring && \
11
+ php7.0-xdebug \
12
+ php7.0-mbstring \
13
+ && \
13
14
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
14
15
15
-
16
- RUN sed -i 's/;daemonize = yes/daemonize = no/g' /etc/php/7.0/fpm/php-fpm.conf
17
-
18
- # CMD ["/usr/sbin/php7.0-fpm"]
16
+ RUN sed -i 's/;daemonize = yes/daemonize = no/g' /etc/php/7.0/fpm/php-fpm.conf
You can’t perform that action at this time.
0 commit comments