-
-
Notifications
You must be signed in to change notification settings - Fork 20
feat: docker deployment #16
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
Conversation
… and development, added steps on how to run it into README.md
|
It's great, there's no need to migrate db. Because I'll do an automatic migration. I'll write a Nitrojs plugin. |
|
Okay get it, that way it's even better. |
|
dockerhub first test please check. |
- Add GitHub Actions workflow for automated Docker Hub publishing - Increase Node.js heap size to fix build memory issues - Update docker-compose.yaml to use published image - Support multi-platform builds (linux/amd64, linux/arm64)
|
Please check the codes I sent again and adjust them as you wish, then let's proceed. |
- Add comprehensive .dockerignore rules to exclude unnecessary files - Reduce build context from ~5.59MB to ~534KB (90% reduction) - Exclude Git, documentation, test files, and mobile SDKs from Docker image - Improve build performance and security by filtering sensitive files - Maintain required files like package.json and pnpm-lock.yaml for builds
|
Okay I will check it out. |
… and development, added steps on how to run it into README.md
- Add GitHub Actions workflow for automated Docker Hub publishing - Increase Node.js heap size to fix build memory issues - Update docker-compose.yaml to use published image - Support multi-platform builds (linux/amd64, linux/arm64)
- Add comprehensive .dockerignore rules to exclude unnecessary files - Reduce build context from ~5.59MB to ~534KB (90% reduction) - Exclude Git, documentation, test files, and mobile SDKs from Docker image - Improve build performance and security by filtering sensitive files - Maintain required files like package.json and pnpm-lock.yaml for builds
# Conflicts: # README.md
|
I went through the github actions yaml file you added. It is pretty neat, something that I wanted to make as a next step. I have removed the migrate container from my docker compose as well as the migration stage in Dockerfile. |
|
Great, thank you ❤️ |
It took me a while as I haven't been doing anykind of a similar project to understand how Nitro, Nuxt works. Although I have successfully been able to create docker compose with profiles for different usecases and a multistage Dockerfile. I really enjoyed doing it. Thanks for experience and I look forward for next contributions and hope you like this one.
See below for changes.
Docker support and configuration:
Dockerfilewith separate targets for development, production, and database migration, enabling efficient builds and environment-specific containers.docker-compose.yamlfile to orchestrate services for Postgres, Redis, development, production, and migration, with appropriate environment variables, volumes, and dependencies..dockerignorefile to exclude unnecessary files and directories (likenode_modules,.idea,tests,.nuxt, andios) from Docker build context, reducing image size.Environment and documentation updates:
.env.exampleto include required Postgres environment variables (POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB) for Docker Compose compatibility.README.mdwith detailed instructions for running the application using Docker and Docker Compose, including migration and production deployment steps.