Simplify testing flow and build process.
This commit is contained in:
parent
ddc81aecc9
commit
268cbf4500
|
@ -73,11 +73,12 @@ jobs :
|
|||
|
||||
- name : Set up functional test environment.
|
||||
run : |
|
||||
docker pull azuracast/azuracast_web_v2:latest
|
||||
docker build --cache-from azuracast/azuracast_web_v2:latest -t azuracast/azuracast_web_v2:latest .
|
||||
|
||||
cp sample.env .env
|
||||
cp azuracast.sample.env azuracast.env
|
||||
|
||||
cp docker-compose.sample.yml docker-compose.yml
|
||||
docker-compose pull web
|
||||
|
||||
cp docker-compose.testing.yml docker-compose.override.yml
|
||||
|
||||
docker-compose build web
|
||||
|
|
15
Dockerfile
15
Dockerfile
|
@ -46,7 +46,8 @@ ENV VIRTUAL_HOST="azuracast.local" \
|
|||
HTTPS_METHOD="noredirect"
|
||||
|
||||
# Sensible default environment variables.
|
||||
ENV APPLICATION_ENV="production" \
|
||||
ENV LANG="en_US.UTF-8" \
|
||||
APPLICATION_ENV="production" \
|
||||
ENABLE_ADVANCED_FEATURES="false" \
|
||||
MYSQL_HOST="mariadb" \
|
||||
MYSQL_PORT=3306 \
|
||||
|
@ -60,3 +61,15 @@ ENV APPLICATION_ENV="production" \
|
|||
# Entrypoint and default command
|
||||
ENTRYPOINT ["/usr/local/bin/uptime_wait"]
|
||||
CMD ["/usr/local/bin/my_init"]
|
||||
|
||||
# Test image
|
||||
FROM base AS testing
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -q -y php7.4-xdebug
|
||||
|
||||
ENV PATH="${PATH}:/var/azuracast/.composer/vendor/bin" \
|
||||
APPLICATION_ENV="testing"
|
||||
|
||||
# Production image
|
||||
FROM base AS prod
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
version: '2.2'
|
||||
|
||||
services:
|
||||
web:
|
||||
image: azuracast_cli:latest
|
||||
environment:
|
||||
APPLICATION_ENV: 'testing'
|
||||
build:
|
||||
context: ./util/docker/testing
|
||||
volumes:
|
||||
- .:/var/azuracast/www
|
||||
services :
|
||||
web :
|
||||
build :
|
||||
target : testing
|
||||
cache_from :
|
||||
- azuracast/azuracast_web_v2:latest
|
||||
environment :
|
||||
APPLICATION_ENV : 'testing'
|
||||
volumes :
|
||||
- .:/var/azuracast/www
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
FROM azuracast/azuracast_web_v2:latest
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -q -y php7.4-xdebug
|
||||
|
||||
ENV PATH="${PATH}:/var/azuracast/.composer/vendor/bin"
|
||||
|
||||
ENV LANG="en_US.UTF-8" \
|
||||
APPLICATION_ENV="testing"
|
||||
|
||||
USER root
|
Loading…
Reference in New Issue