Browse Source

feat(docker):setingan docker si

pull/1/head
root 7 months ago
parent
commit
6e626eccb4
  1. 4
      Dockerfile
  2. 18
      docker-compose.yml

4
Dockerfile

@ -35,6 +35,7 @@ COPY /docker/php/php.ini /usr/local/etc/php/
#Install Extensions #Install Extensions
RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql
#RUN composer config -g repo.packagist composer https://packagist.org
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
@ -43,7 +44,8 @@ WORKDIR /var/www/html
COPY . . COPY . .
RUN chmod +x artisan RUN chmod +x artisan
RUN composer install --ignore-platform-reqs --prefer-dist --no-scripts --no-progress --no-interaction --no-dev --no-autoloader RUN composer update
RUN composer install --prefer-dist --no-scripts --no-progress --no-interaction --no-dev --no-autoloader
RUN composer dump-autoload --optimize RUN composer dump-autoload --optimize
RUN chown -R www-data:www-data . RUN chown -R www-data:www-data .

18
docker-compose.yml

@ -5,8 +5,8 @@ services:
restart: unless-stopped restart: unless-stopped
tty: true tty: true
ports: ports:
- '8444:80' - '5144:80'
- '8555:443' # - '8555:443'
volumes: volumes:
- .:/var/www/html - .:/var/www/html
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/ - ./docker/nginx/conf.d/:/etc/nginx/conf.d/
@ -23,19 +23,9 @@ services:
restart: unless-stopped restart: unless-stopped
networks: networks:
- ospro - ospro
db:
image: postgres:14.4-alpine
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- SERVICE_NAME=postgres
ports:
- '5439:5432'
networks:
- ospro
volumes: volumes:
- db:/var/lib/postgresql/data - ./assets:/var/www/html/assets
networks: networks:
ospro: ospro:
driver: bridge driver: bridge

Loading…
Cancel
Save