Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: star-server


jobs:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.PTOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
Expand Down
39 changes: 29 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
FROM fukamachi/qlot:latest as build
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt set -x; \

RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt \
set -x; \
apt-get update && \
apt-get install -y \
make \
libffi-dev \
pkg-config \
librabbitmq-dev \
build-essential
make \
libffi-dev \
pkg-config \
librabbitmq-dev \
build-essential

RUN ros setup

COPY . /root/

WORKDIR /root/
RUN qlot install
RUN qlot exec make build
RUN make install
RUN qlot exec sbcl --non-interactive \
--load source/starintel-gserver.asd \
--eval '(ql:quickload :starintel-gserver)' \
--eval "(sb-ext:save-lisp-and-die \"star-server\" :toplevel 'star::main :executable t)"


FROM build as star-server

VOLUME /config
EXPOSE 5000
RUN echo '#!/bin/sh\n\
set -e\n\
# Check if /config/init.lisp exists; if not, use /root/init.lisp\n\
INIT_FILE="/config/init.lisp"\n\
if [ ! -f "$INIT_FILE" ]; then\n\
echo "/config/init.lisp not found. Using default /root/example_configs/init.lisp."\n\
INIT_FILE="/root/example_configs/init.lisp"\n\
fi\n\
# Execute the server with the determined init file\n\
exec /root/star-server start -i "$INIT_FILE"' > /usr/local/bin/entrypoint.sh \
&& chmod +x /usr/local/bin/entrypoint.sh

ENTRYPOINT ./star-server
CMD [./star-server]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
File renamed without changes.
1 change: 0 additions & 1 deletion qlfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
ql serapeum :latest
ql alexandria :latest
ql babel :latest
ql cl-json :latest
ql uuid :latest
ql anypool :latest
ql clack :latest
Expand Down
6 changes: 1 addition & 5 deletions source/starintel-gserver.asd
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@
#:cl-rabbit
#:sento
#:babel
#:cl-json
:uuid
;; Not using
#:uuid
#:anypool
#:clack
#:ningle
;; Will use wookie
#:clingon
;; Move to config
#:slynk
#:nhooks
#:lparallel
Expand Down