Skip to content

Commit

Permalink
Merge pull request #987 from portabilis/docker
Browse files Browse the repository at this point in the history
Torna agnóstica a configuração da imagem PHP
  • Loading branch information
edersoares authored Dec 23, 2024
2 parents 5a0d56a + 4cce7c4 commit c5ea3ac
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
56 changes: 39 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,51 @@
x-php: &php
build:
context: docker/php
args:
PHP_VERSION: 8.3
COMPOSER_VERSION: 2.7
image: php:8.3-ieducar
pull_policy: never
working_dir: /var/www/ieducar
volumes:
- ./:/var/www/ieducar
links:
- postgres
- redis
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
environment:
CACHE_DRIVER: redis
REDIS_HOST: redis
DB_HOST: postgres
PGPASSWORD: ieducar

services:

php:
<<: *php
container_name: ieducar-php
build:
context: docker/php
args:
PHP_VERSION: 8.3
COMPOSER_VERSION: 2.7
links:
- postgres
- redis
environment:
CACHE_DRIVER: redis
REDIS_HOST: redis
DB_HOST: postgres
PGPASSWORD: ieducar
working_dir: /var/www/ieducar
volumes:
- ./:/var/www/ieducar
command: tail -f /dev/null
depends_on: []

fpm:
<<: *php
container_name: ieducar-fpm

horizon:
<<: *php
container_name: ieducar-horizon
command: /var/www/ieducar/artisan horizon
restart: always

nginx:
container_name: ieducar-nginx
image: nginx:1.26-alpine
links:
- php
- fpm
working_dir: /var/www/ieducar
volumes:
- ./:/var/www/ieducar
Expand Down
2 changes: 1 addition & 1 deletion docker/nginx/upstream.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
upstream php-fpm {
server php:9000;
server fpm:9000;
}

0 comments on commit c5ea3ac

Please sign in to comment.