You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, you must set some env variables to configure the services access:
106
+
107
+
```bash
108
+
export DB_USERNAME="your user for db"
109
+
export DB_PASSWORD="you db user password"
110
+
export DB_ROOT_USER="root username"
111
+
export DB_ROOT_PASSWORD="root db user password"
112
+
export RABBITMQ_USER="rabbitmq username"
113
+
export RABBITMQ_PASSWORD="rabbitmq password"
114
+
```
115
+
116
+
Also, if you want to add https, you need to setup the `DOMAIN` variable:
117
+
118
+
```bash
119
+
export DOMAIN="your domain"
120
+
```
121
+
122
+
It's not mandatory, but we recommend you doing that. In case you're going to setup HTTPS, there's a script to setup your certs using `certbot`. Doing that is, sometimes, very trick, so I'm letting here the setup I did in my environment, but remember to check [let's encrypt documentation](https://letsencrypt.org/docs/) and [certbot's](https://certbot.eff.org/) as well.
123
+
124
+
In my case, I bought a real domain that can be reach outside on the internet and them used certbot to generate the certificates.
Doing that, certbot will request you to add some information and then adding a acme challenge via DNS. Check your provider's documentation to see how to add that.
138
+
By the end of this process, certbot will generate the `.pem` files and will store that at `/etc/letsencrypt/archive/{your-domain}/`. This location is going to be mounted inside docker when running, so you don't need to do anything else.
139
+
140
+
Once we are running on a local network, it's not possible to access the domain right away. So to run:
141
+
142
+
```bash
143
+
sudo echo"172.18.0.30 your-domain"| sudo tee -a /etc/hosts
144
+
```
145
+
146
+
It's not required for cloud providers, by for local running it's a good option.
147
+
148
+
If you have this server running in the same network, but on a different machine, make the mapping using the other computer's IP.
149
+
150
+
Setting this up, we can run the docker compose file as:
151
+
152
+
```bash
153
+
# for dockerhub images
154
+
docker compose up -d
155
+
156
+
# for ghcr images
157
+
docker compose -f ./ghcr-prod-compose.yml up -d
158
+
```
159
+
160
+
After some minutes, the server is ready to be used. You can check its API endpoints at: `http://your-domain:8080/swagger/index.html`, `https://your-domain/swagger/index.html` or even `http://172.18.0.30:8080/swagger/index.html` (remember this IP may change depending on where you're running it).
0 commit comments