Results
No results found.
Installing and configuring dependencies
If you intend to use SQLite please skip this step
To install the MySQL server files, run the following:
sudo apt update && sudo apt install mysql-server
To start the MySQL service:
sudo systemctl start mysql.service
Let's set a password for the MySQL root user.
Connect to MySQL:
sudo mysql
Use the following command to create user and password:
mysql> ALTER USER "locker_secrets"@"%" IDENTIFIED WITH mysql_native_password BY "password";
Now create the database with the same name:
mysql> CREATE DATABASE locker_secrets;
And grant permissions for the user on that database:
mysql> GRANT ALL PRIVILEGES ON locker_secrets.* TO 'locker_secrets'@'%';
To install Nginx, run the following:
sudo apt update && sudo apt install nginx
Create a folder for Locker secrets API deployment:
mkdir locker_api && cd locker_api
Write an .env
file with content as below:
PROD_ENV=prod
DJANGO_SECRET_KEY=[
If you choose SQLite as the database, you need to mount volume to avoid losing data after container restart, for example create a folder name db
mkdir db
Run the docker command, replace api_port and web_socket_port with custom values.
docker run --env-file .env -p 127.0.0.1:[
Configure Nginx and HTTPS: create a file named api
inside the folder /etc/nginx/sites-enabled
with the following content.
Note
server {
listen [
Restart Nginx service
sudo service nginx restart
Now the Locker secrets API is up and running at https://locker_secrets_api_domain:[nginx_port]
Create a folder for Locker secrets Web deployment
mkdir locker_web && cd locker_web
Write an .env
file with content as below
REACT_APP_API_URL=https://[
Run the docker command, replace web_port with a custom value.
docker run --env-file .env --restart always -p 127.0.0.1:[
Configure Nginx and HTTPS, create a file named web
inside the folder /etc/nginx/sites-enabled
with the following content
Note
server {
listen [
Restart Nginx service
sudo service nginx restart
Now the Locker secrets Web is up and running at https://locker_secrets_web_domain:
[nginx_port]