Skip to content

Commit

Permalink
chore: Fixed docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Mar 8, 2024
1 parent d1f8203 commit 9cc0021
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ services:
build:
# Custom image for file permissions
context: ./docker/mysql
#context: ./docker/postgres
#context: ./docker/mariadb
args:
USER_UID: ${USER_UID}
ports:
Expand All @@ -55,8 +53,8 @@ services:
MYSQL_HOST: db
MYSQL_USER: db_user
MYSQL_PASSWORD: db_password
links:
- db:db
depends_on:
- db
networks:
- frontproxynet
- default
Expand Down Expand Up @@ -104,7 +102,7 @@ services:
networks:
- default

app:
app: &app_template
# Need to pass all vars to docker env for Crontab and supervisor scripts
env_file: "./.env.local"
build:
Expand All @@ -113,12 +111,8 @@ services:
USER_UID: ${USER_UID}
depends_on:
- db
- db_test
- solr
- redis
links:
- solr:solr
- redis:redis
volumes:
- ./:/var/www/html:cached
networks:
Expand All @@ -130,37 +124,24 @@ services:
DEFAULT_GATEWAY: ${DEFAULT_GATEWAY}

worker:
extends:
service: app
<<: *app_template
deploy:
replicas: 1
entrypoint: ["php", "/var/www/html/bin/console", "messenger:consume", "async", "--time-limit=60"]
restart: unless-stopped
depends_on:
- db
- solr
- redis

cron:
extends:
service: app
<<: *app_template
# https://github.com/dubiousjim/dcron/issues/13#issuecomment-1406937781
init: true
entrypoint: ["crond", "-f", "-L", "15"]
restart: unless-stopped
depends_on:
- db
- solr
- redis

nginx:
image: roadiz/nginx-alpine:latest
ports:
- ${PUBLIC_APP_PORT}:80/tcp
depends_on:
- app
links:
- app:app
volumes:
- ./:/var/www/html:cached
networks:
Expand Down

0 comments on commit 9cc0021

Please sign in to comment.