Skip to content

Commit e77a8b9

Browse files
Rearrange Docker config
Signed-off-by: Christoph Wurst <[email protected]>
1 parent 415c8be commit e77a8b9

12 files changed

+4803
-94
lines changed

Diff for: .scrutinizer.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ imports:
1616

1717
tools:
1818
external_code_coverage:
19-
runs: 2
20-
timeout: 1800
19+
runs: 1
20+
timeout: 150
2121

Diff for: .travis.yml

+6-15
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ sudo: required
22
dist: trusty
33
language: php
44
php:
5-
- 7
6-
- 7.1
5+
- 7.2
76

87
addons:
98
mariadb: "10.0"
@@ -20,14 +19,8 @@ env:
2019

2120
matrix:
2221
include:
23-
- php: 7
24-
env: WS_TEST=lint_php
25-
- php: 7.1
26-
env: WS_TEST=lint_php
27-
- php: 7.1
28-
env: WS_TEST=js
29-
- php: 7.1
30-
env: WS_TEST=docker
22+
- env: WS_TEST=lint_php
23+
- env: WS_TEST=js
3124
fast_finish: true
3225

3326
branches:
@@ -43,7 +36,9 @@ before_script:
4336
- npm install -g yarn
4437

4538
# Install dependencies
46-
- make install-deps
39+
- if [[ "$WS_TEST" = "js" ]]; then npm install; fi
40+
- if [[ "$WS_TEST" = "js" ]]; then ./node_modules/bower/bin/bower install; fi
41+
- if [[ "$WS_TEST" = "php" ]]; then composer install; fi
4742

4843
# Set up DB
4944
- mysql -u root -e 'create database weinstein_test;'
@@ -68,9 +63,5 @@ script:
6863
- if [[ "$WS_TEST" = "js" ]]; then ./node_modules/grunt-cli/bin/grunt; fi
6964
- if [[ "$WS_TEST" = "js" ]]; then ./node_modules/grunt-cli/bin/grunt karma:continuous; fi
7065

71-
# Docker
72-
- if [[ "$WS_TEST" = "docker" ]]; then ./node_modules/grunt-cli/bin/grunt; fi
73-
- if [[ "$WS_TEST" = "docker" ]]; then ./build/docker-images.sh; fi
74-
7566
after_script:
7667
- if [[ "$WS_TEST" = "php" ]]; then cat storage/logs/laravel.log; fi

Diff for: Dockerfile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM node:9.5.0 as js-builder
2+
WORKDIR /app
3+
COPY package*.json /app/
4+
RUN npm install
5+
COPY . .
6+
RUN ./node_modules/bower/bin/bower install --allow-root
7+
RUN ./node_modules/grunt-cli/bin/grunt
8+
9+
FROM composer:latest as php-builder
10+
COPY . /app
11+
RUN composer install --ignore-platform-reqs --no-dev -o
12+
13+
FROM weinstein/webserver:latest
14+
COPY . /var/www
15+
COPY --from=js-builder /app/public/css/*.css /var/www/public/css/
16+
COPY --from=js-builder /app/public/js /var/www/public/js
17+
COPY --from=php-builder /app/vendor /var/www/vendor
18+
USER root
19+
RUN chown -R www-data /var/www && \
20+
chgrp -R 0 /var/www && \
21+
chmod -R g+rw /var/www/storage && \
22+
chmod -R u+rw /var/www/storage
23+
USER www-data
24+
WORKDIR /var/www

Diff for: Makefile

-12
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,3 @@ all: build
33
build:
44
./node_modules/grunt-cli/bin/grunt uglify
55

6-
install-deps:
7-
yarn install
8-
./node_modules/bower/bin/bower install
9-
composer install
10-
11-
test:
12-
./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
13-
14-
clean:
15-
rm -rf node_modules
16-
rm -rf public/js/vendor
17-
rm -rf vendor

Diff for: bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Weinstein",
2+
"name": "weinstein",
33
"description": "",
44
"main": "",
55
"authors": [

Diff for: build/test_php.sh

-21
This file was deleted.

Diff for: deploy/app.dev.docker

-7
This file was deleted.

Diff for: deploy/app.docker

-9
This file was deleted.

Diff for: deploy/vhost.conf

-18
This file was deleted.

Diff for: deploy/web.dev.docker

-4
This file was deleted.

Diff for: deploy/web.docker

-5
This file was deleted.

0 commit comments

Comments
 (0)