From 2cc71c5769684b01b9b61e726c1aa667a70fe311 Mon Sep 17 00:00:00 2001
From: Paramtamtam <7326800+tarampampam@users.noreply.github.com>
Date: Thu, 23 Feb 2023 20:36:19 +0400
Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A7=20Changes=20that=20do=20n?=
=?UTF-8?q?ot=20modify=20src=20or=20test=20files?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.dockerignore | 21 ++++++++++-----------
.editorconfig | 7 +++----
docker-compose.yml | 7 ++++++-
3 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/.dockerignore b/.dockerignore
index 0d837385..feb5d224 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,11 +1,10 @@
-test
-.editorconfig
-.git
-.github
-.idea
-.vscode
-temp
-tmp
-LICENSE
-Makefile
-mikrotik-hosts-parser
+## Ignore everything
+*
+
+## Except the following files and directories
+!/cmd
+!/configs
+!/internal
+!/pkg
+!/web
+!/go.*
diff --git a/.editorconfig b/.editorconfig
index 78123cf9..34a56c72 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,3 +1,5 @@
+# EditorConfig docs:
+
root = true
[*]
@@ -5,11 +7,8 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
-indent_size = 4
-trim_trailing_whitespace = true
-
-[*.{yml, yaml, sh, conf, json}]
indent_size = 2
+trim_trailing_whitespace = true
[{Makefile, go.mod, *.go}]
indent_style = tab
diff --git a/docker-compose.yml b/docker-compose.yml
index 3ea855f7..767e515b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,6 +3,7 @@ version: '3.8'
volumes:
tmp-data: {}
redis-data: {}
+ golint-go: {}
golint-cache: {}
services:
@@ -17,6 +18,7 @@ services:
- /etc/group:/etc/group:ro
- .:/src:rw
- tmp-data:/tmp:rw
+ security_opt: [no-new-privileges:true]
web:
<<: *app-service
@@ -36,12 +38,15 @@ services:
test: ['CMD', 'redis-cli', 'ping']
interval: 500ms
timeout: 1s
+ security_opt: [no-new-privileges:true]
golint:
image: golangci/golangci-lint:v1.51-alpine # Image page:
environment:
GOLANGCI_LINT_CACHE: /tmp/golint #
volumes:
- - .:/src:ro
+ - golint-go:/go:rw # go dependencies will be downloaded on each run without this
- golint-cache:/tmp/golint:rw
+ - .:/src:ro
working_dir: /src
+ security_opt: [no-new-privileges:true]