DBapp Infrastructure

This commit is contained in:
Hladu357 2025-02-20 13:27:34 +02:00
parent f873d51127
commit 259cb0c8b8
3 changed files with 31 additions and 0 deletions

12
CT1/database/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM alpine:latest
RUN apk update && \
apk add --no-cache build-base sqlite sqlite-dev
WORKDIR /app
COPY . .
RUN make
ENTRYPOINT ["./dbapp"]

16
CT1/database/Makefile Normal file
View File

@ -0,0 +1,16 @@
CXX = g++
CXXFLAGS = -std=c++20 -Wall -pedantic -O2
LDFLAGS = -lsqlite3
SRCS = $(wildcard *.cpp)
EXECS = $(SRCS:.cpp=)
all: $(EXECS)
%: %.cpp
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
clean:
rm -f $(EXECS)
.PHONY: all clean

3
CT1/database/run.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker build -t dbapp .
docker run --rm -it dbapp