Compare commits

...

2 Commits

18 changed files with 35 additions and 25 deletions

View File

@ -9,13 +9,19 @@ Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
# Configure for deployment environment
Replace beetround.example.com in prod.exs for "url" & "check_origin"
TODO: verify that "url" replacement in config.exs ins't necessary (should be overruled by prod.exs, right?)
# Deployment on new uberspace asteroid
## Initial deployment
### Add subdomain
uberspace web domain add beetround.example.com
`uberspace web domain add beetround.example.com`
### Init database
@ -24,57 +30,58 @@ https://lab.uberspace.de/guide_postgresql/
#### Configure database
createuser beetround_admin -P
`createuser beetround_admin -P`
createdb --encoding=UTF8 --owner=beetround_admin --template=template0 beetround_server
`createdb --encoding=UTF8 --owner=beetround_admin --template=template0 beetround_server`
## Configure Elixir/Phoenix
uberspace tools version use erlang 27
`uberspace tools version use erlang 27`
## Build & run BeetRound
cd ~/
`cd ~/`
mkdir develop
`mkdir develop`
git clone https://git.working-copy.org/bent/BeetRoundServer.git
`git clone https://git.working-copy.org/bent/BeetRoundServer.git`
cd develop
`cd develop`
export MIX_ENV=prod
`export MIX_ENV=prod`
mix deps.get
`mix deps.get`
mix phx.gen.secret
`mix phx.gen.secret`
export SECRET_KEY_BASE=<SECRET_KEY>
`export SECRET_KEY_BASE=<SECRET_KEY>`
export DATABASE_URL=ecto://beetround_admin:<DB_PASSWORD>@localhost/beetround_server
`export DATABASE_URL=ecto://beetround_admin:<DB_PASSWORD>@localhost/beetround_server`
mix assets.deploy #throws "'mix tailwind beet_round_server --minify' exited with 1" error
`mix assets.deploy` #throws "'mix tailwind beet_round_server --minify' exited with 1" error
Workaround: copy assets from develop machine
mix compile
`mix compile`
PHX_HOST=beetround.example.com PORT=4005 mix ecto.migrate
`PHX_HOST=beetround.example.com PORT=4005 mix ecto.migrate`
### Create webbackend
uberspace web backend set beetround.example.com --http --port 4005
`uberspace web backend set beetround.example.com --http --port 4005`
#### Test backend
PHX_HOST=beetround.example.com PORT=4005 mix phx.server
`PHX_HOST=beetround.example.com PORT=4005 mix phx.server`
#### Create mix release
mix release
`mix release`
### Create service
nvim ~/etc/services.d/beetround_server.ini
Create service file:
`~/etc/services.d/beetround_server.ini:`
```
[program:beetround_server]
@ -94,11 +101,11 @@ environment =
SECRET_KEY_BASE=<SECRET_KEY>
```
supervisorctl reread
`supervisorctl reread`
supervisorctl update
`supervisorctl update`
supervisorctl status
`supervisorctl status`
## Updates (TODO old content. needs to be adjusted/checked)

View File

@ -20,7 +20,6 @@
Server zum Sammeln der digital abgegeben Gebote.
</p>
<%= if true do %>
<br />
<a
href={~p"/biddings"}
@ -28,7 +27,6 @@
>
Zu meinen Geboten
</a>
<% end %>
<div class="flex">
<div class="w-full sm:w-auto">

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,5 @@
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
User-agent: *
Disallow: /

BIN
priv/static/robots.txt.gz Normal file

Binary file not shown.