-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-compose build failed #1288
Comments
Hey @linlin-coder! I'm here to help you with any bugs or questions you have while waiting for the human maintainers. Let's squash those bugs together! 🐞 The build process fails with a To resolve this issue, ensure that the
Here is an example of how you might modify the # client/Dockerfile
FROM node:14
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# Add wait-for-it.sh script
COPY wait-for-it.sh /wait-for-it.sh
RUN chmod +x /wait-for-it.sh
# Wait for the server to be available before running the build
CMD /wait-for-it.sh server:8000 -- npm run build
#!/bin/bash
host="$1"
shift
cmd="$@"
until nc -z "$host" 8000; do
>&2 echo "Server is unavailable - sleeping"
sleep 1
done
>&2 echo "Server is up - executing command"
exec $cmd
services:
postgresql:
image: postgres:16
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
depends_on:
- server
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge By ensuring the |
Same error, any solution yet? |
到对应目录下面找到page.tsx文件里面添加这行: 这个项目太多坑... |
Guess it's something related to js... |
十分感谢,项目已启动起来 |
You can refer to the above reply for settings, but the following files need to be modified
|
Hey, Did you get it working? I am having the same issue. Added " "use client"; export const dynamic = 'force-dynamic' const MainPage = () => { const handleSpaceClick = () => { useEffect(() => { return ( )} {isError && ( Something went wrong fetching credentials, please refresh the page )} </> ); }; export default MainPage; |
Any update on this issue? Looks like docker setup is not working as expected. |
Has anyone faced this issue on their Docker setup? Looks like it's not addressed yet. |
can confirm issue, running docker on manjaro linux, spin up server container beforehand does not solve it |
Any workaround here? Not able to get started because of this issue. |
I added the following line to the bottom of all the 15 page.tsx files found using find -name "page.tsx" : export const dynamic = 'force-dynamic'; Ran docker-compose build again and went through successfully. |
@khoonie thanks a lot, could you submit a PR for that if it fixes the issue? |
It's worked, thank you very much |
System Info
when i run docker-compose build,some error message as follows:
🐛 Describe the bug
version: master
docker-compose.yml content as follows:
The text was updated successfully, but these errors were encountered: