diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e6fa5c0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.tmp/ +.cache/ +.git/ +build/ +node_modules/ +.env +data/ +backup/ \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..440d5da --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,19 @@ +# Code of Conduct + +## Welcome to Our Open-Source Community + +This collaborative project strives to create an inclusive and welcoming environment. We value all contributors' and participants' interactions that reflect courtesy, respect, and kindness. + +We have a zero-tolerance policy for any form of abuse or harassment. + +If you have concerns about behaviour, please reach out to Divio at info@divio.com. + +Reports will be treated confidentially and taken seriously. The project maintainers may take appropriate action, including exclusion from participation in this and other projects, if necessary. + +## Guidelines for Code Review + +Code review is a crucial but sometimes challenging process for contributors and reviewers. It involves constructive critique, and improvements are often needed before accepting contributions. + +We expect contributors to recognize that all aspects of their submissions, including code and underlying ideas, will be carefully reviewed. + +Reviewers are encouraged to provide feedback sensitively and respectfully, aligning with our shared goal for the project's success. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f5c70d8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to the Project + +Thank you for contributing! We appreciate your involvement in making this project better. Before you start, please familiarize yourself with our [Code of Conduct](./CODE_OF_CONDUCT.md). + +## Submitting Proposals + +Proposals can be submitted through: + +- [Pull Requests](https://github.com/divio/getting-started-with-payload/pulls) +- [Issues](https://github.com/divio/getting-started-with-payload/issues) + +## Pull Requests and Branches + +When making pull requests, adhere to the following: + +- Submit from a properly named new branch. +- Target the `main` branch. + +Learn more: + +- [How to make pull requests](https://help.github.com/articles/using-pull-requests/) +- [Managing branches](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) + +### Whitespace + +Avoid trailing whitespace (spaces or tabs at the end of a line). They might be invisible and lead to silent issues or unexpected changes. Some editors may silently delete them by default. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..40b943b --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2024, Divio AG +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Divio AG nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL DIVIO AG BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index f21342c..b5090bb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,32 @@ -# blank +# Getting Started with Payload -blank +[![Deploy to Divio](https://docs.divio.com/deploy-to-divio.svg)](https://control.divio.com/app/new/?template_url=https://github.com/divio/getting-started-with-payload/archive/refs/heads/main.zip) -## Attributes +> [!WARNING] +> This template is based on the [Beta version of Payload](https://payloadcms.com/blog/30-beta-install-payload-into-any-nextjs-app-with-one-line). We recommend using it for testing and development purposes only. -- **Database**: mongodb -- **Storage Adapter**: localDisk +## Cloud Setup + +Create a [Divio Account](https://control.divio.com/) and lick the `Deploy to Divio` button above and follow the app creation wizard. Make sure: + +* to add **PostgreSQL** within your **Services**. +* to add the following entries to the "Release commands" section within your **Settings**: + ```bash + pnpm run payload migrate:create + pnpm run payload migrate + ``` + +For in-depth details about Divio Cloud, refer to the [Divio documentation](https://docs.divio.com/introduction/). + +## Local Setup + +Install the [Divio CLI](https://github.com/divio/divio-cli) to set up your app locally. + +Alternatively, build this app locally using Docker: + +1. Ensure [Docker](https://docs.docker.com/get-docker/) is installed and running. +2. Clone this repository locally. +3. Build the app with `docker compose build`. +4. Build the app with `docker compose run web npm install`. +5. Run the app using `docker compose up`. +6. Open [http://localhost:8000]() to view your app.