Skip to content

Step into Moonlitgrace, where a passionate web developer and open-source contributor shares insights, projects, and creativity—all under the alias Moonlitgrace.

Notifications You must be signed in to change notification settings

moonlitgrace/moonlitgrace.space

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moonlitgrace.space

Step into Moonlitgrace, where a passionate web developer and open-source contributor shares insights, projects, and creativity—all under the alias Moonlitgrace.

Table of Contents

Development

Basic Steps

  • git clone https://github.com/moonlitgrace/moonlitgrace.space moonlitgrace.space
  • cd moonlitgrace.space
  • npm i

Configure environment variables

From repo you will get 3 .env files such as:

  • .env.example
  • .env.development
  • .env.local.example

Check Environment Variable Load Order for more information regarding this structure.

For SECRET_KEY you can use anything since it is for development. (You can use this openssl rand -base64 32 to create for production.)

As for ADMIN_USERNAME and ADMIN_PASSWORD add something to authenticate only you.

DATABASE_URL: uncomment value according to your selected workflow (see next heading).

Run app on local

Before running app, we need a postgres db running.
You can either run db on your system or use docker/podman.

eg postgresql connection string format: postgresql://[db_user[:db_password]@][db_host][:db_port]/[db_name]

If you've docker/podman installed, you can run db on a container with command:

# docker compose -f docker-compose.db.yml up
podman compose -f docker-compose.db.yml up

Now db is up!
Next run database migrations with commands:

# can use any package manager
npm run db:generate
npm run db:migrate

If you want some mock data for development: run: npm run db:seed

To get next.js app running, run this command:

npm run dev

And that's for now! check localhost:3000 to see app running!

Run app on container

(un)fortunately this app is containerized, so you can easily run it with docker/podman/any(idk).
Just run this command:

# docker compose -f docker-compose.dev.yml up --build
podman compose -f docker-compose.dev.yml up --build

This will run app on localhost:3000, hurray?

Next.js on container is not fun imho.
recommended: local setup

About

Step into Moonlitgrace, where a passionate web developer and open-source contributor shares insights, projects, and creativity—all under the alias Moonlitgrace.

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •