Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
SMarioMan authored Oct 30, 2024
1 parent c03500c commit 0442539
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Use an official Ubuntu base image
FROM ubuntu:22.04

# Remove interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# Install all required dependencies in advance
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
# cook
make inkscape ffmpeg flac fdkaac vorbis-tools opus-tools zip unzip \
wget \
# redis
lsb-release curl gpg \
ca-certificates redis redis-server redis-tools \
# web
postgresql \
# install
sed coreutils build-essential \
# Other dependencies
sudo git && \
# Cleanup
apt-get -y autoremove

WORKDIR /app

# Copy all changes, particularly environment variables with discord API keys
COPY . .
# Run first-time setup for faster restarts
RUN ./install.sh

# Expose app port
EXPOSE 3000
# Expose API port
EXPOSE 5029
# Start Craig
CMD ["sh", "-c", "/app/start.sh"]


# Usage:

# Build:
# docker build -t craig .

# Run:
# docker run -i -p 3000:3000 -p 5029:5029 craig

0 comments on commit 0442539

Please sign in to comment.