From ed6dcd0f292c58ab44adbda40621c93b3af976be Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Tue, 6 May 2025 11:06:02 +0330 Subject: [PATCH] add env file for next js service --- docker-compose.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7029441..8d6094d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,7 +48,7 @@ services: build: context: ${LARAVEL_PROJECT_PATH} dockerfile: Dockerfile - container_name: ${PROJECT_NAME} + container_name: laravel tty: true ports: - "9000:9000" @@ -98,16 +98,12 @@ services: context: ${NEXT_JS_PATH} dockerfile: Dockerfile container_name: nextjs - environment: - - NEXT_PUBLIC_VERSION=${NEXT_PUBLIC_VERSION} - - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL} - - NEXT_PUBLIC_SERVER_SOCKET_URL=${NEXT_PUBLIC_SERVER_SOCKET_URL} + env_file: + - ${NEXT_JS_PATH}/.env.local volumes: - ${NEXT_JS_PATH}:/var/www/nextjs ports: - - "3000:3000" - env_file: - - .env.local + - "3106:3000" restart: unless-stopped profiles: - server