Journal is a self-hosted application designed for photographers to publish their work. By leveraging the latest web technologies, this application provides a responsive and user-friendly interface that enhances the presentation of a photographic journal, with the freedom and control that comes from self-hosting.
Note: The theme is optimized for pictures with an aspect ratio of 3:2, 2:3, or 1:1.
- Node v20
- zx
- PostgreSQL (for standalone installation)
- Docker (for Docker installation)
git clone git@github.com:claireso/journal.git
zx scripts/install/start.mjs
Choose between a standalone installation or an installation using Docker and follow the steps.
At the end, a .env
file will be created at the root of the project with all the variables used by the application.
$ npm install
$ npm run dev
The application will be running at http://localhost:3000
To change the default port of the application, add it to the command as follows:
$ PORT=4000 npm run dev
Note:
- don't forget to update your
.env
There are two ways to run the application in a production environment
By default the folder where your photos are uploaded (uploads
) is not served by the server himself.
You will need to configure a reverse proxy (with nginx for example)
When your reverse proxy is configured run the commands follow:
$ npm run build
$ npm run start
The application will be running at http://localhost:3000
To change the default port of the application, add it to the command as follow:
$ npm run start -- -p 4000
Note:
- don't forget to update your
.env
If you can't use a reverse proxy just use the commands follow:
$ npm run build
$ npm run start:express
The application will be running at http://localhost:3000
To change the default port of the application, add it to the command as follow:
$ PORT=4000 npm run start:express
Note:
- remove option
output: 'standalone'
fromnext.config.js
- don't forget to update your
.env
The installation created all necessary Docker images.
To launch the application, run docker compose up
and visit https://localhost.
Note:
- With Docker, HTTPS is used. You will need to generate SSL certificates in the
certificates
folder. Files must be named${SERVER_NAME}.pem
and${SERVER_NAME}-key.pem
(the same SERVER_NAME in your .env). - You can use Next.js to generate certificates to launch the application in your local environment