Added a Dockerfile and docker-compose to this project
The compose requieres the printer image too
This commit is contained in:
+3
-1
@@ -1,5 +1,7 @@
|
||||
FROM alpine:20231219
|
||||
|
||||
# Set the appropriate timezone
|
||||
ENV TZ="Europe/Lisbon"
|
||||
|
||||
# Install the required packages
|
||||
RUN apk --no-cache add bash zsh go make sqlite \
|
||||
@@ -12,6 +14,6 @@ COPY ./src /frontend-src
|
||||
|
||||
# Add the entrypoint
|
||||
USER $UNAME
|
||||
COPY ./start.sh /start.sh
|
||||
COPY ./container/start.sh /start.sh
|
||||
STOPSIGNAL SIGTERM
|
||||
ENTRYPOINT [ "/start.sh" ]
|
||||
|
||||
@@ -13,6 +13,8 @@ attach-test:
|
||||
test: clean
|
||||
docker run \
|
||||
--name esilva-fax-container-test \
|
||||
-v ./data.db:/data.db \
|
||||
-v ./src/config.yml:/etc/fax/config.yml \
|
||||
-p 8083:8083 \
|
||||
-it esilva-fax zsh
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Start jellyfin
|
||||
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
|
||||
if [ ! -d /frontend ]; then
|
||||
export GOPROXY="https://goproxy.io"
|
||||
cd /frontend-src
|
||||
make clean
|
||||
make build
|
||||
mv build /frontend
|
||||
cd ..
|
||||
rm -r /frontend-src
|
||||
ln -s /data.db /frontend/data.db
|
||||
fi
|
||||
|
||||
cd /frontend
|
||||
@@ -0,0 +1,36 @@
|
||||
networks:
|
||||
esilva-faxnetwork:
|
||||
name: esilva-faxnetwork
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
esilva-fax:
|
||||
hostname: esilva-fax
|
||||
build: ./
|
||||
image: esilva-fax
|
||||
container_name: esilva-fax-container
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
networks:
|
||||
- esilva-faxnetwork
|
||||
volumes:
|
||||
- ./data.db:/data.db
|
||||
- ./src/config.yml:/etc/fax/config.yml
|
||||
ports:
|
||||
- "8083:8083"
|
||||
tmpfs:
|
||||
- /tmp
|
||||
restart: unless-stopped
|
||||
|
||||
esilva-printer:
|
||||
hostname: esilva-printer
|
||||
build: ../gothermal/
|
||||
image: esilva-printer
|
||||
container_name: esilva-printer-container
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
networks:
|
||||
- esilva-faxnetwork
|
||||
tmpfs:
|
||||
- /tmp
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user