1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Update Readme.

This commit is contained in:
Ferdinand Mütsch 2019-10-08 09:08:52 +02:00
parent 6f3b6a479d
commit 82acd2725e
2 changed files with 13 additions and 5 deletions

View File

@ -1,8 +1,16 @@
# Build Stage
FROM golang:alpine AS build-env
ADD . /src
RUN cd /src && go build -o wakapi
# final stage
# Final Stage
# When running the application using `docker run`, you can pass environment variables
# to override config values from .env using `-e` syntax.
# Available options are:
# WAKAPI_DB_USER
# WAKAPI_DB_PASSWORD
# WAKAPI_DB_HOST
# WAKAPI_DB_NAME
FROM alpine
WORKDIR /app
COPY --from=build-env /src/wakapi /app/

View File

@ -6,7 +6,7 @@
[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoff.ee/n1try)
## Prerequisites
* Go >= 1.10 (with `$GOPATH` properly set)
* Go >= 1.13 (with `$GOPATH` properly set)
* A MySQL database
## Usage
@ -23,12 +23,12 @@
* `api_key = the_api_key_printed_to_the_console_after_starting_the_server`
* Open [http://localhost:3000](http://localhost:3000) in your browser
## Docker
* Edit the docker-compose file and change passwords for the DB
### Run with Docker
* Edit `docker-compose.yml` file and change passwords for the DB
* Build the container `docker-compose build`
* Start the application `docker-compose up -d`
* To get the api key look in the logs `docker-compose logs | grep "API key"`
* The application should now be running on `hostname:3000`
* The application should now be running on `localhost:3000`
### User Accounts