Copy built files to nginx image

This commit is contained in:
Adam Goldsmith 2020-11-24 00:14:16 -05:00
parent cc859e559d
commit e88fbed238
2 changed files with 9 additions and 3 deletions

View File

@ -9,3 +9,6 @@ COPY parameters.yml /srv/app/config/parameters.yml
COPY --from=composer:1 /usr/bin/composer /usr/bin/composer
RUN cd /srv/ && composer install
FROM nginx as nginx
COPY --from=php-fpm /srv /srv

View File

@ -1,7 +1,9 @@
version: '3'
services:
arkhamdb:
build: .
build:
context: .
target: php-fpm
working_dir: /var/www/html
depends_on:
- database
@ -10,14 +12,15 @@ services:
- ./arkhamdb-json-data:/srv/arkhamdb-json-data
- ./000-default.conf:/etc/apache2/sites-enabled/000-default.conf
nginx:
image: nginx
build:
context: .
target: nginx
depends_on:
- arkhamdb
restart: always
ports:
- 127.0.0.1:80:80
volumes:
- ./arkhamdb:/srv
- ./nginx.conf:/etc/nginx/conf.d/default.conf
database:
image: mariadb