2.2 KiB
2.2 KiB
Set up database containers and run Firefish locally
Prerequisites
- Dependencies
- git
- Node.js
- pnpm
- Rust toolchain
- FFmpeg
- Container runtime
- Docker
- Podman and Podman Compose
- containerd and nerdctl
- or whatever you want to use
- GNU Make
- The following ports are not in use
- 25432
- 26379
You can refer to local-installation.md to install the dependencies.
Configure the environment
- Fork the Firefish repository on GitLab
- Clone your Firefish repository
git clone https://firefish.dev/your-user-name/firefish.git cd firefish
- Copy example config file
cp dev/config.example.env dev/config.env # If you use container runtime other than Docker, you need to modify the "COMPOSE" variable # vim dev/config.env
- Create
.config/default.yml
with the following content# You can change the port if 3000 is already used url: http://localhost:3000 port: 3000 db: host: localhost port: 25432 db: firefish_db user: firefish pass: password redis: host: localhost port: 26379 logLevel: [ 'error', 'success', 'warning', 'info' ]
- Start database containers
make db.up
Build and start Firefish
- Build Firefish
pnpm install pnpm run build:debug
- Execute database migrations
pnpm run migrate
- Start Firefish
You can access to the local Firefish server on http://localhost:3000 after this message shows up!pnpm run start
DONE * [core boot] All workers started DONE * [core boot] Now listening on port 3000 on http://localhost:3000
Reset the environment
You can recreate a fresh local Firefish environment by recreating the database containers:
make db.init
pnpm run migrate
pnpm run start