Skip to content

Commit

Permalink
Dockerfile: enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
scbizu committed Aug 19, 2019
1 parent 126ba4a commit 1466570
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@

FROM golang:1.12 AS BUILDER

WORKDIR /project/Astral

ADD . /project/Astral

RUN export GO11MODULE="on" && cd /project/Astral && go mod download && go build .
RUN export GO11MODULE="on" && go build -o astral .

FROM alpine:latest
FROM golang:1.12

WORKDIR /Astral

COPY --from=BUILDER /project/Astral/Astral .
COPY --from=BUILDER /project/Astral/astral /Astral/astral


62 changes: 26 additions & 36 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
AstralCommandService:
image: scnace/astral:lastest
restart: always
ports:
- 8443:8443
environment:
- BOTKEY={$BOTKEY}
- LISTENPORT={$LISTENPORT}
command:
- /bin/sh
- -c
- "cd /Astral \n./Astral service Command\n"

AstralServerMessage:
image: scnace/astral:lastest
restart: always
ports:
- 8444:8444
environment:
- BOTKEY={$BOTKEY}
- LISTENPORT={$LISTENPORT}
command:
- /bin/sh
- -c
- "cd /Astral \n./Astral service AstralServerMessage\n"

AstralSC2EventInfo:
image: scnace/astral:lastest
restart: always
environment:
- BOTKEY={$BOTKEY}
- ASTRAL_DISCORD_CLIENT_ID={$ASTRAL_DISCORD_CLIENT_ID}
command:
- /bin/sh
- -c
- "cd /Astral \n./Astral service SC2EventInfo\n"
version: "3"
services:
AstralCommandService:
image: scnace/astral:local
container_name: command_service
restart: always
ports:
- 8443:8443
environment:
- BOTKEY=${BOTKEY}
- LISTENPORT=${LISTENPORT}
command:
- /bin/sh
- -c
- "/Astral/astral service Command\n"
AstralSC2EventInfo:
image: scnace/astral:local
container_name: starcraft2_event
restart: always
environment:
- BOTKEY=${BOTKEY}
- ASTRAL_DISCORD_CLIENT_ID=${ASTRAL_DISCORD_CLIENT_ID}
command:
- /bin/sh
- -c
- "/Astral/astral service SC2EventInfo\n"

0 comments on commit 1466570

Please sign in to comment.