Here resides the v2 version of the goeuropean.org website.
This project is built on top of the PayloadCMS Javascript framework. This repository contains the "entire stack" so-to-speak.
If you are a contributor, it's good that you familiarise yourself with the README, and there are loads of useful information in the CONTRIBUTING.md to setup your development environment for example.
If you plan to buid and run the application in "production", please follow below.
Depending on the way you want to run the application, either directly on your machine or with Docker, you will need additional software and services.
The only thing you need to build and run the application with Docker is Docker itself.
If you do not go with Docker, you will need:
This application needs a PostgreSQL database to store its data.
To build the application, the PostgreSQL database must be running and reachable.
First thing first, you need to declare the DATABASE_URI environment variable
in a .env file.
If your DB is reachable at db_host:
echo 'DATABASE_URI=postgres://user:password@db_host:db_port/db_name' > .env
docker buildx build --tag goeu:test .If your DB is running on your local machine:
echo 'DATABASE_URI=postgres://user:password@db_host:db_port/db_name' > .env
docker buildx build --network host --tag goeu:test .e.g.
echo 'DATABASE_URI=postgres://myadmin:SomePassword@mypostgresdb.com:5432/goeuropean' > .env
docker buildx build --network host --tag goeu:test .e.g. If you followed the development environment instructions in the CONTRIBUTING:
docker buildx build --network host --tag goeu:test .If everything went according to plan, you should now have a goeu:test Docker image on your machine.
If you are having trouble with "Access denied" errors, this might be Docker's fault, us the following command from the projects' root to easily fix it:
sudo chown --reference . --recursive .pnpm install-
echo 'DATABASE_URI=postgres://user:password@db_host:db_port/db_name' > .env pnpm build
TODO: where are the build files?
Once your application is built (either way), configuration is done with environment variables.
DATABASE_URI: Connection string to the PostgreSQL database.PAYLOAD_SECRET: (string) Used to encrypt JWT tokens.NEXT_PUBLIC_SERVER_URL: e.g.http://localhost:3000. Used to configure CORS, format links and more. No trailing slash.CRON_SECRET: (string) Secret used to authenticate cron jobs.PREVIEW_SECRET: (string) Used to validate preview requests.
You can define all of the environment variables in a .env file, and then:
docker run --env-file .env --publish 3000:3000 goeu:testTODO