Auctionen til Sct. Omega Broderskab for aar 2025
Omega auksjonen er en årlig akusjon der medlemmer av Sct. Omega Broderskab auksjonerer vekk forkjellige ting og tjenester. På slutten går alle inntektene til et veldedig formål.
This is a Next.js project bootstrapped with create-next-app.
First, install all packages
npm install
Generate a client for the database
npx prisma generate
Push schema to database
npx prisma db push
Install pyton and requirements detailed in services/picture_server/requirements.txt
To run the picture server run the main.py file
Run
npm run dev Open the project in your browser on the link provided by npm after running "npm run dev" to see the result.
Duplicate the "default.env" file and rename it ".env" For development DATABASE_URL, FEIDE_CLIENT_ID and FEIDE_CLIENT_SECRET needs to be filled out
- Change the "const pictureServerSource" in pictureServerIp.ts reflects your picture server ip
- Change default values for "finalSaleTime" and "currentSaleTime" in your "schema.prisma" file and "auctionStart", "auctionNormalEnd" and "auctionFinalEnd" in "timeCheck.ts" to reflect the auction start and end date. There have been problems with timezones and server set up. Test to make sure the time is how you expect
- Update your "app.config['MAX_CONTENT_LENGTH']" in "main.py" and "bodySizeLimit" in "next.config.mjs" to set max picture upload size
- After running the picture server, add your default picture in to "uploads/" as "default.jpeg"
Check for build errors locally
docker compose --env-file default.env -f docker-compose.prod.yml buildDuplicate the "default.env" file and rename it ".env" Fill in all environment variables Open ports 5432, 80, 443 and 42069.
Build with:
docker compose -f docker-compose.prod.yml buildUp the project with:
docker compose -f docker-compose.prod.yml upBuild and up the project with:
docker compose -f docker-compose.prod.yml up --buildAdd "-d" to detach
Down the project with:
docker compose -f docker-compose.prod.yml downThe database is perserved between docker volumes. To reset the database
rm -rf postgres-dataTo make a default picture. Upload an image through the put item for auction page. Go in to the uploads folder and use command
sudo mv [your picture] default.jpeg