-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add docker container infrastructure
Also required creating a web ui interface to force the admin password and settings to be set. Also unified logging to a single format.
- Loading branch information
Showing
16 changed files
with
825 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM python:3.8-alpine | ||
WORKDIR / | ||
ENV FLASK_APP=hashview | ||
ENV FLASK_RUN_HOST=0.0.0.0 | ||
RUN apk add --no-cache gcc musl-dev linux-headers libffi-dev | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
EXPOSE 5000 | ||
COPY . . | ||
CMD ["flask", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: "3.9" | ||
|
||
services: | ||
app: | ||
build: . | ||
links: | ||
- db | ||
ports: | ||
- "5000:5000" | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
|
||
db: | ||
image: "mysql:8-debian" | ||
restart: always | ||
cap_add: | ||
- SYS_NICE | ||
environment: | ||
MYSQL_DATABASE: hashview | ||
MYSQL_USER: hashview | ||
MYSQL_PASSWORD: hashview | ||
MYSQL_RANDOM_ROOT_PASSWORD: yes | ||
ports: | ||
- '3306:3306' | ||
volumes: | ||
- db:/var/lib/mysql | ||
healthcheck: | ||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] | ||
timeout: 20s | ||
retries: 10 | ||
|
||
volumes: | ||
db: | ||
driver: local |
Oops, something went wrong.