You have to provide environment variables to Docker. Here's how to do it:
- Next to this
README.mdfile, create a file named.env - You should now have following structure:
nasRocket/ ├─ ... ├─ .env ├─ ... ├─ README.md └─ ... - Open it with an editor and copy this into it:
HOSTNAME= ACME_EMAIL= - Fill in the values right after the
=. Here's what they mean:HOSTNAME: Where your cloud will be reachable online, e.g.abc.com,abc.def.comorabc.com/defACME_EMAIL: An e-mail address that will be used for getting a TLS certificate (which you need to establish a safe connection via HTTPS). I recommend not using a throw away address since you might receive actually relevant notifications
Important
The file name must exactly be .env.
You have to provide secrets (passwords) to Docker. Here's how to do it:
- Next to
README.md(this file), create a directory namedsecrets - Go in to
secretsand create a file namedpg_pw_admin - Open it with an editor and put the secret in it (you can also just generate it with a tool of your liking)
- Repeat Step 3 and 4 with the following filenames:
kochbuch_pw_adminpg_pw_backendsession_secret
- You should now have following structure:
nasRocket/ ├─ ... ├─ secrets/ │ ├─ kochbuch_pw_admin │ ├─ pg_pw_admin │ ├─ pg_pw_backend │ └─ session_secret ├─ ... ├─ .env ├─ ... ├─ README.md └─ ... - Now run this to protect the secrets:
chmod 644 secrets/*
Note
The content of kochbuch_pw_admin will be the password you use when first logging in as user admin.
Important
The file names must exactly match the respective file name. They must not have any file ending!
- Next to
README.md(this file), create a directory namedletsencrypt - Go in to
letsencryptand create a file namedacme.json - You should now have following structure:
nasRocket/ ├─ ... ├─ letsencrypt/ │ └─ acme.json ├─ ... ├─ secrets/ │ ├─ kochbuch_pw_admin │ ├─ pg_pw_admin │ ├─ pg_pw_backend │ └─ session_secret ├─ ... ├─ .env ├─ ... ├─ README.md └─ ... - Now run this to protect acme.json:
chmod 600 letsencrypt/acme.json
Once you've completed the setup, you can start the entire application by doing
docker compose -f compose.yaml -f compose.prod.yaml up -d