Skip to content

Commit

Permalink
Cleaner Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lexicalunit committed May 4, 2024
1 parent 57b42d0 commit 5336d10
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ to worry about installing anything or managing your environment.
You can quickly get a PostgreSQL Database running locally with `docker`:

```shell
docker run -i --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:12.9
docker run -i --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:15
```

You should then be able to connect to this database using `psql`:
Expand Down Expand Up @@ -44,5 +44,5 @@ docker run -it --rm -p 8080:80 \
-e BOT_TOKEN="<Your Discord provided bot token>" \
-e SPELLTABLE_AUTH_KEY="<Your SpellTable API auth token>" \
-e DEBUG_GUILD="<optional: Debug guild id to use>" \
lexicalunit/spellbot
<lexicalunit/spellbot (pulled from registry) or spellbot (built locally)>
```
25 changes: 12 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,26 @@ ENV DD_API_KEY="fake"
ENV DD_INSTALL_ONLY="true"
ENV DD_AGENT_MAJOR_VERSION="7"
ADD https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh /tmp/install_script.sh
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
git \
&& chmod +x /tmp/install_script.sh \
&& bash -c /tmp/install_script.sh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY conf/datadog.yaml /etc/datadog-agent/datadog.yaml
EXPOSE 8125/udp 8126/tcp

# supervisord
# spellbot
COPY scripts/start-spellbot.sh /start-spellbot.sh
COPY scripts/start-spellapi.sh /start-spellapi.sh
COPY scripts/start.sh /start.sh
COPY conf/supervisord.conf /usr/local/etc/

# spellbot
COPY src /spellbot/src
COPY LICENSE.md README.md pyproject.toml poetry.lock /spellbot/

RUN apt-get update \
&& apt-get install -y --no-install-recommends git curl \
&& chmod +x /tmp/install_script.sh \
&& bash -c /tmp/install_script.sh \
&& chmod +x /start-spellbot.sh /start-spellapi.sh /start.sh \
&& pip install --no-cache-dir ./spellbot \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN chmod +x /start-spellbot.sh /start-spellapi.sh /start.sh \
&& pip install --no-cache-dir ./spellbot
EXPOSE 80

CMD ["supervisord"]

0 comments on commit 5336d10

Please sign in to comment.