mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2024-11-09 22:24:06 -08:00
Add a Dockerfile for future Docker support
This commit is contained in:
parent
6ba34ebf77
commit
df6b70a365
25
docker/Dockerfile
Normal file
25
docker/Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
|||
FROM alpine:latest
|
||||
|
||||
# Install required packages
|
||||
RUN apk add --update --no-cache git python3 py3-pip
|
||||
|
||||
# Clone the repository
|
||||
RUN git clone https://github.com/TheCommsChannel/TC2-BBS-mesh.git
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir --break-system-packages -r /TC2-BBS-mesh/requirements.txt
|
||||
|
||||
# Copy configuration script
|
||||
COPY configini.sh /
|
||||
|
||||
# Set permissions for configuration script
|
||||
RUN chmod +x /configini.sh
|
||||
|
||||
# Define config volume
|
||||
VOLUME /config
|
||||
|
||||
# Define working directory
|
||||
WORKDIR /config
|
||||
|
||||
# Define the command to run
|
||||
CMD ["sh", "-c", " /configini.sh && python3 /TC2-BBS-mesh/server.py"]
|
4
docker/configini.sh
Normal file
4
docker/configini.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
if [ ! -f "/config/config.ini" ]; then
|
||||
cp "/TC2-BBS-mesh/config.ini" "/config/config.ini"
|
||||
fi
|
7
docker/docker-compose.yaml
Normal file
7
docker/docker-compose.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
services:
|
||||
tc2-bbs-mesh:
|
||||
build: .
|
||||
restart: always
|
||||
volumes:
|
||||
- ./config:/config
|
||||
container_name: tc2-bbs-mesh
|
Loading…
Reference in a new issue