Install the dependencies and build the server
yarn install
cargo build
Start development
yarn dev
Run the fllowing script to build the blog app image in local machine.
docker build -t blog-app .
mount the configuration file into the container and create an external port map for the container to connect to it.
docker run --name blog-app -p 8080:8080 --link postgres \
-v /path/to/config.toml:/etc/blog-server/config.toml \
-d blog-app
Put the self-signed certificate in this directory as an example but your browser would complain thatit isn't secure. So we recommend to use mkcert
to trust it. To use local CA, running:
mkcert -install
If you want to generate your own cert/private key file, then run:
mkcert 127.0.0.1 localhost
Set the corresponding options in config.toml
as follows:
[actix.tls]
enabled = true
certificate = "/path/to/*.crt"
private-key = "/path/to/*.key"