Warning
- The project is under very active development.
- Expect bugs and breaking changes.
- Do not use the app as the only way to backup your emails.
- Always follow 3-2-1 backup plan.
In order to self-host Archiveium, you'll need Docker Engine and Docker Compose. Deployment of Archiveium involves following services,
- Frontend app - for interaction with user.
- Cron scheduler - for running background jobs eg. downloading emails from IMAP server.
- Postgres database
- Minio (local S3)
- Redis
In order to deploy the above mentioned components, follow the steps mentioned below,
-
In a terminal window, clone the repository and enter the directory.
git clone git@github.com:archiveium/archiveium.git cd archiveium/docker -
Create a
config.jsonfile withinarchiveium/dockerdirectory based on values from default.json. Adjustconfig.jsonas required. -
Update following placeholders in
docker-compose.ymlwith values matching those provided inconfig.json$DB_PASSWORD$DB_DATABASE$DB_USERNAME$MINIO_USER$MINIO_PASSWORD$MEILI_MASTER_KEY(should be of at least 16 bytes)
-
Create admin user by updating
docker-compose.ymland setting following environment variables,APP_ADMIN_EMAILAPP_ADMIN_PASSWORD(password is hashed before storing in database)
Note that creation of only 1 admin user is allowed. If after creating an admin user, the above mentioned variable are changed then those values are ignored. Also, changing password isn't allowed by changing
APP_ADMIN_PASSWORDonly. -
For other available environment variables, please refer to docker-compose.yml file.
-
Bring up the stack by running
docker-compose up -d
docker/docker-compose.ymlin this repository is constantly updated with latest available version.- Please refrain from mixing and matching versions of app & cron services. While in an ideal world, things should work correctly regardless of versions used, however, since I do not test combination of different versions, the same cannot be guaranteed as of now.
- Clone this repository
- Create
development.jsonunder config directory and add values based ondefault.json. For further reference on how configs are loaded refer to config package. - Update pull style to be rebase by running
git config pull.rebase truein project directory. - Create admin user by updating
development.jsoncreated previously and fill in values foradminEmailandadminPassword.
Following this open the project in VS Code. VS Code should then prompt you to open project in dev container. This will result in VS Code building required containers to get started. Once VS Code is done,
Start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --openStarting the development server will take care of running migrations as well as seeding the database.
To create a production version of your app:
npm run buildYou can preview the production build with npm run preview.