mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
compile server exe in docker and export to /bin/
This commit is contained in:
parent
cce213f902
commit
6e70e4295e
3 changed files with 33 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,6 +9,9 @@ htmldocs/
|
|||
# file uploads directory
|
||||
uploads/
|
||||
|
||||
# docker build directory
|
||||
bin/
|
||||
|
||||
# database
|
||||
*.db
|
||||
|
||||
|
|
21
README.md
21
README.md
|
@ -13,12 +13,27 @@ nimble install jester norm checksums
|
|||
Compile and run:
|
||||
|
||||
```sh
|
||||
nimble run --deepcopy:on
|
||||
nimble run
|
||||
```
|
||||
|
||||
More verbose compilation:
|
||||
Build project:
|
||||
|
||||
```sh
|
||||
nimble run --deepcopy:on --verbose -d:normDebug --spellSuggest
|
||||
nimble build
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
To compile the binary only, run the following (executable will be found in `/bin/`):
|
||||
|
||||
```sh
|
||||
docker buildx build -t glimpse-server:latest --output=bin --target=runner -f
|
||||
```
|
||||
|
||||
To deploy an instance of the server, run:
|
||||
|
||||
```sh
|
||||
|
||||
```
|
||||
|
||||
## API Endpoints
|
||||
|
|
12
bin.dockerfile
Normal file
12
bin.dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM nimlang/nim:latest AS builder
|
||||
WORKDIR /src
|
||||
COPY . /src
|
||||
|
||||
RUN apt-get -y update && apt-get -y upgrade && apt-get -y autoremove
|
||||
|
||||
RUN nimble -y install jester norm checksums
|
||||
RUN nimble build
|
||||
|
||||
FROM scratch AS runner
|
||||
|
||||
COPY --from=builder /src/server .
|
Loading…
Add table
Reference in a new issue