Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/compose #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Run using Docker
# Run using Docker Compose

```bash
docker compose up
```
docker build . -t pokerfrontend

docker run -v $(pwd):/app -p 4000:4000 pokerfrontend
## Local storage options

These options should be set in the browsers local storage:

```bash
api-key # your API key for the backend.
base-url # the URL for the backend. Defaults to "api.pokerbot.dk"
```
2 changes: 1 addition & 1 deletion admin-panel/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const backendUrl = "https://api.pokerbot.dk"
const backendUrl = localStorage.getItem("base-url") ?? "https://api.pokerbot.dk";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kan du ikke tilføje en linje i readme omkring det her?

const apiKey = localStorage.getItem("api-key");

async function loadTables() {
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
pokerfrontend:
container_name: pokerfrontend
restart: unless-stopped
build:
dockerfile: ./Dockerfile
ports:
- 4000:4000
volumes:
- ./:/app
3 changes: 2 additions & 1 deletion submit/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
</main>

<script>
const baseURL = "https://api.pokerbot.dk";
const baseURL =
localStorage.getItem("base-url") ?? "https://api.pokerbot.dk";

document
.getElementById("uploadForm")
Expand Down