This commit is contained in:
@@ -7,12 +7,18 @@
|
||||
- copy `.env.example` file and save as `.env`
|
||||
- copy `.env_db.example` file and save as `.env_db`
|
||||
- change the values in `.env` and `.env_db`
|
||||
you can use `mix phx.gen.secret` to generate secrets
|
||||
update the PHX_HOST to your domain name
|
||||
you can use `mix phx.gen.secret` to generate secrets.
|
||||
update the PHX_HOST to your domain name.
|
||||
- run `docker compose up -d`
|
||||
- run migrations `docker exec -it dbi bin/migrate`
|
||||
- open the url (`PHX_HOST`) in a browser
|
||||
register a user
|
||||
- open the url (`PHX_HOST`) in a browser.
|
||||
register a user.
|
||||
- install nginx for as a reverse proxy
|
||||
- configure the web-site config for nginx
|
||||
change example.com to your domain.
|
||||
copy example config from `examples/nginx/example.com.conf` to `/etc/nginx/sites-available`.
|
||||
rename the file to your domain and change the domain within the file.
|
||||
enable the web-site with command `ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/`.
|
||||
- run the commands to promote an user to the admin.
|
||||
change `admin@example.com` to your email.
|
||||
```shell
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
server {
|
||||
server_name example.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:4000;
|
||||
|
||||
# Add WebSocket support
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user