neptune_cms

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2023 License: AGPL-3.0

README

NeptuneCms

Description

A content management system on premise

Table of Contents

Getting Started

Prerequisites

List any software, dependencies, or tools that users need to install or configure before using your project. Make sure to specify versions if necessary.

  • Docker
  • Go (Golang)
  • Goose (database migration tool)
  • Other dependencies...
Usage
1. Clone the repository:

ssh

git clone git@github.com:stellayazilim/neptune_cms.git
cd neptun_cms

http

git clone https://github.com/stellayazilim/neptune_cms.git
cd neptun_cms
2. Set up your database environment by modifying the following fields in the Makefile:
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • POSTGRES_DB
  • POSTGRES_PORT
  • POSTGRES_HOST
3. Start enviroment
make spinup
4. Run the migrations to set up your database:
make up
5. Start the application in development mode with hot reload:
make dev

Commands

Each of the Makefile commands available in project.

  • spinup: Spin up the database and other services using Docker Compose.
  • spindown: Spin down (stop and remove) the Docker containers.
  • start:dev: Start the application in development mode with hot reload.
  • create: Create a new migration file.
  • up: Migrate the database to the most recent version.
  • up-by-one: Migrate the database up by one version.
  • up-to: Migrate the database to a specific version.
  • down: Roll back the database to the previous version.
  • down-to: Roll back the database to a specific version.
  • redo: Re-run the latest migration.
  • reset: Roll back all migrations.
  • status: Show the migration status for the current database.
  • version: Display the current version of the database.
  • fix: Apply sequential ordering to migrations.
  • validate: Check migration files without running them.
  • test:db: Run tests on the database.
  • test:unit: Run unit tests.
  • test:unit:watch : Run init tests on watch mode.
  • test:cov: Run code coverage tests.

Testing

1. To run unit tests:
make test:unit
1. To run unit tests watch mode:
make test:unit:watch
2. To run code coverage tests and generate a coverage report:
make test:cov
3. To test database migrations, you can use:

note: you need a fresh database instance

make test:db

Contributing

Any helps are appreciated, feel free to fork this repository

License

AGPL-3.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL