Fixed release file build (did not include frontend files), formatting

main
Igor Scheller 6 years ago
parent bdb653090c
commit 590adffa93

@ -12,6 +12,7 @@ variables:
DOCROOT: /var/www/
stages:
- build-frontend
- build
- test
- release
@ -26,19 +27,19 @@ stages:
before_script:
- docker login -u gitlab-ci-token -p "${CI_JOB_TOKEN}" "${CI_REGISTRY}"
build-image:
build-image.nginx:
<<: *docker_definition
stage: build
stage: build-frontend
script:
- docker build --pull -t "${TEST_IMAGE}" -f contrib/Dockerfile .
- docker push "${TEST_IMAGE}"
- docker build --pull -t "${TEST_IMAGE}-nginx" -f contrib/nginx/Dockerfile .
- docker push "${TEST_IMAGE}-nginx"
build-image.nginx:
build-image:
<<: *docker_definition
stage: build
script:
- docker build --pull -t "${TEST_IMAGE}.nginx" -f contrib/nginx/Dockerfile .
- docker push "${TEST_IMAGE}.nginx"
- docker build --pull --build-arg NGINX_IMAGE="${TEST_IMAGE}-nginx" -t "${TEST_IMAGE}" -f contrib/Dockerfile .
- docker push "${TEST_IMAGE}"
test:
image: ${TEST_IMAGE}

@ -91,8 +91,8 @@ docker-compose build
or to build the containers separately
```bash
docker build -f contrib/Dockerfile . -t engelsystem
docker build -f contrib/nginx/Dockerfile . -t engelsystem-nginx
docker build -f contrib/Dockerfile . -t engelsystem
```
Import database

@ -31,7 +31,6 @@
"psr/log": "^1.0",
"symfony/http-foundation": "^3.3",
"symfony/psr-http-message-bridge": "^1.0",
"twbs/bootstrap": "^3.3",
"twig/extensions": "^1.5",
"twig/twig": "^2.5",
"zendframework/zend-diactoros": "^1.7"

@ -1,8 +1,14 @@
# Setup
ARG NGINX_IMAGE=engelsystem-nginx:latest
# composer install
FROM composer AS composer
COPY composer.json /app/
RUN composer --no-ansi install --no-dev --ignore-platform-reqs
RUN composer --no-ansi dump-autoload --optimize
# Use frontend container for assets
FROM ${NGINX_IMAGE} AS frontend
# Intermediate container for less layers
FROM alpine as data
@ -11,6 +17,7 @@ COPY config/ /app/config
COPY db/ /app/db
COPY includes/ /app/includes
COPY public/ /app/public
COPY --from=frontend /var/www/public/assets/ /app/public/assets
COPY resources/lang /app/resources/lang
COPY resources/views /app/resources/views
COPY src/ /app/src
@ -22,6 +29,7 @@ COPY --from=composer /app/composer.lock /app/
RUN rm -f /app/config/config.php
# Build the PHP container
FROM php:7-fpm-alpine
WORKDIR /var/www
COPY --from=data /app/ /var/www

Loading…
Cancel
Save