Browse Source

fix docker composer problem

pull/3/head
Yusuf 2 years ago
parent
commit
a488cc98ea
  1. 8
      Dockerfile
  2. 16
      docker-compose.yml

8
Dockerfile

@ -28,14 +28,10 @@ WORKDIR /var/www/html
COPY . .
RUN chmod +x artisan
RUN composer install
RUN composer dump-autoload --optimize
#RUN composer install --ignore-platform-reqs --prefer-dist --no-scripts --no-progress --no-interaction --no-dev --no-autoloader
#RUN composer dump-autoload --optimize
RUN chown -R www-data:www-data .
WORKDIR /home/www-data
USER www-data
EXPOSE 9000
CMD php-fpm

16
docker-compose.yml

@ -8,7 +8,7 @@ services:
- '80:80'
- '443:443'
volumes:
- ./:/var/www/html
- .:/var/www/html:ro,cached
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
links:
- app
@ -16,27 +16,13 @@ services:
- ospro
depends_on:
- app
command: [nginx-debug, '-g', 'daemon off;']
app:
build:
context: .
dockerfile: Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
working_dir: /var/www/html
volumes:
- .:/var/www/html
restart: unless-stopped
ports:
- "9000:9000"
networks:
- ospro
healthcheck:
test: curl --fail http://localhost || exit 1
interval: 60s
retries: 5
start_period: 20s
timeout: 10s
db:
image: postgres:14.4-alpine
restart: always

Loading…
Cancel
Save