Initial changes for removing sysbox dependency
This commit is contained in:
parent
1f463bdacb
commit
00b2ca2407
50
deb-files/Dockerfile
Normal file
50
deb-files/Dockerfile
Normal file
@ -0,0 +1,50 @@
|
||||
# Use the official Ubuntu 22.04 as the base image
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Set the DEBIAN_FRONTEND environment variable to noninteractive to avoid prompts during package installation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update the package list and clean up the apt cache to reduce image size
|
||||
RUN apt-get update && \
|
||||
#apt-get install -y supervisor && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the .deb package for backend-flo into the container
|
||||
COPY dind_backend-flo_0.15.1.1-satoshilabs-1_amd64.deb /tmp/backend-flo.deb
|
||||
|
||||
# Update the package list, install the .deb package, and remove the .deb file to reduce image size
|
||||
RUN apt-get update && \
|
||||
apt-get install -y /tmp/backend-flo.deb && \
|
||||
rm /tmp/backend-flo.deb
|
||||
|
||||
# Expose the RPC port for the backend
|
||||
EXPOSE 8066
|
||||
|
||||
# Copy the .deb package for blockbook-flo into the container
|
||||
COPY dind_blockbook-flo_0.4.0_amd64.deb /tmp/blockbook-flo.deb
|
||||
|
||||
# Update the package list, install the .deb package, and remove the .deb file to reduce image size
|
||||
RUN apt-get update && \
|
||||
apt-get install -y /tmp/blockbook-flo.deb && \
|
||||
rm /tmp/blockbook-flo.deb
|
||||
|
||||
# Expose ports for the frontend
|
||||
EXPOSE 9166
|
||||
EXPOSE 9066
|
||||
|
||||
# Copy supervisor configuration
|
||||
#COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# Declare volumes for persistence
|
||||
VOLUME /
|
||||
|
||||
# Start the service and keep the container running by tailing the log file
|
||||
CMD /bin/bash -c "/opt/coins/nodes/flo/bin/flod -datadir=/opt/coins/data/flo/backend -conf=/opt/coins/nodes/flo/flo.conf -pid=/run/flo/flo.pid && tail -f /opt/coins/data/flo/backend/debug.log && /opt/coins/blockbook/flo/bin/blockbook -blockchaincfg=/opt/coins/blockbook/flo/config/blockchaincfg.json -datadir=/opt/coins/data/flo/blockbook/db -sync -internal=:9066 -public=:9166 -certfile=/opt/coins/blockbook/flo/cert/blockbook -explorer= -log_dir=/opt/coins/blockbook/flo/logs -dbcache=1073741824"
|
||||
|
||||
# Start supervisor
|
||||
#CMD ["/usr/bin/supervisord"]
|
||||
|
||||
|
||||
# check logs of the services
|
||||
# tail -f /opt/coins/data/flo/backend/debug.log
|
||||
# tail -f /opt/coins/blockbook/flo/logs/blockbook.INFO
|
||||
24
deb-files/Dockerfile.backend
Executable file
24
deb-files/Dockerfile.backend
Executable file
@ -0,0 +1,24 @@
|
||||
# Use the official Ubuntu 22.04 as the base image
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Set the DEBIAN_FRONTEND environment variable to noninteractive to avoid prompts during package installation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update the package list and clean up the apt cache to reduce image size
|
||||
RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the .deb package for backend-flo into the container
|
||||
COPY dind_backend-flo_0.15.1.1-satoshilabs-1_amd64.deb /tmp/backend-flo.deb
|
||||
|
||||
# Update the package list, install the .deb package, and remove the .deb file to reduce image size
|
||||
RUN apt-get update && \
|
||||
apt-get install -y /tmp/backend-flo.deb && \
|
||||
rm /tmp/backend-flo.deb
|
||||
|
||||
# Expose the RPC port for the backend
|
||||
EXPOSE 8066
|
||||
|
||||
# Start the service and keep the container running by tailing the log file
|
||||
CMD ["/bin/bash", "-c", "/opt/coins/nodes/flo/bin/flod -datadir=/opt/coins/data/flo/backend -conf=/opt/coins/nodes/flo/flo.conf -pid=/run/flo/flo.pid & tail -f /opt/coins/data/flo/backend/debug.log"]
|
||||
|
||||
26
deb-files/Dockerfile.blockbook
Normal file
26
deb-files/Dockerfile.blockbook
Normal file
@ -0,0 +1,26 @@
|
||||
# Use the official Ubuntu 22.04 as the base image
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Set the DEBIAN_FRONTEND environment variable to noninteractive to avoid prompts during package installation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update the package list and clean up the apt cache to reduce image size
|
||||
RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the .deb package for blockbook-flo into the container
|
||||
COPY dind_blockbook-flo_0.4.0_amd64.deb /tmp/blockbook-flo.deb
|
||||
|
||||
# Update the package list, install the .deb package, and remove the .deb file to reduce image size
|
||||
RUN apt-get update && \
|
||||
apt-get install -y /tmp/blockbook-flo.deb && \
|
||||
rm /tmp/blockbook-flo.deb
|
||||
|
||||
# Expose ports for the frontend
|
||||
EXPOSE 9166
|
||||
EXPOSE 9066
|
||||
|
||||
# Start the service and keep the container running by tailing the log file
|
||||
CMD ["/bin/bash", "-c", "/opt/coins/blockbook/flo/bin/blockbook -blockchaincfg=/opt/coins/blockbook/flo/config/blockchaincfg.json -datadir=/opt/coins/data/flo/blockbook/db -sync -internal=:9066 -public=:9166 -certfile=/opt/coins/blockbook/flo/cert/blockbook -explorer= -log_dir=/opt/coins/blockbook/flo/logs -dbcache=1073741824 & tail -f /opt/coins/blockbook/flo/logs/blockbook.INFO"]
|
||||
|
||||
|
||||
31
deb-files/docker-compose.yml
Normal file
31
deb-files/docker-compose.yml
Normal file
@ -0,0 +1,31 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.backend
|
||||
ports:
|
||||
- "8066:8066"
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.blockbook
|
||||
ports:
|
||||
- "9166:9166"
|
||||
- "9066:9066"
|
||||
depends_on:
|
||||
- backend
|
||||
environment:
|
||||
- BACKEND_HOST=backend
|
||||
- BACKEND_PORT=8066
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
19
deb-files/supervisord.conf
Normal file
19
deb-files/supervisord.conf
Normal file
@ -0,0 +1,19 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
|
||||
[program:flod]
|
||||
command=/opt/coins/nodes/flo/bin/flod -datadir=/opt/coins/data/flo/backend -conf=/opt/coins/nodes/flo/flo.conf -pid=/run/flo/flo.pid
|
||||
user=flo
|
||||
autostart=false
|
||||
autorestart=false
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/var/log/backend-flo.log
|
||||
stderr_logfile=/var/log/backend-flo-error.log
|
||||
|
||||
[program:blockbook]
|
||||
command=/opt/coins/blockbook/flo/bin/blockbook -blockchaincfg=/opt/coins/blockbook/flo/config/blockchaincfg.json -datadir=/opt/coins/data/flo/blockbook/db -sync -internal=:9066 -public=:9166 -certfile=/opt/coins/blockbook/flo/cert/blockbook -explorer= -log_dir=/opt/coins/blockbook/flo/logs -dbcache=1073741824
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/var/log/blockbook-flo.log
|
||||
stderr_logfile=/var/log/blockbook-flo-error.log
|
||||
Loading…
Reference in New Issue
Block a user