Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce docker compose file #282

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y npm curl wget tar bash libicu-dev ca-certificates

ARG SOURCES

COPY $SOURCES /usr/local/bin/

#extract file
RUN tar -xzf /usr/local/bin/$SOURCES -C /usr/local/bin/ && \
rm /usr/local/bin/$SOURCES

#make Binner.Web executable
RUN chmod +x /usr/local/bin/Binner.Web

EXPOSE 8090

#execute Binner.Web file
WORKDIR /usr/local/bin/
ENTRYPOINT ["Binner.Web"]
49 changes: 49 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: '3.9'

services:
binner:
build:
args:
SOURCES: ./Binner_linux-x64.tar.gz
context: .
dockerfile: Dockerfile
depends_on:
mariadb:
condition: service_healthy
image: binner
container_name: binner-web
environment:
TZ: #fixme
ports:
- "8090:8090"
volumes:
- type: bind
source: ./appsettings.json
target: /usr/local/bin/appsettings.json
networks:
- app-network

mariadb:
image: mariadb:latest
environment:
TZ: #fixme
MYSQL_ROOT_PASSWORD: #fixme
MYSQL_DATABASE: #fixme
MYSQL_USER: #fixme
MYSQL_PASSWORD: #fixme
container_name: binner-mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
volumes:
- type: bind
source: ./db
target: /var/lib/mysql
networks:
- app-network

networks:
app-network: