Skip to content

Commit b6d6943

Browse files
committed
refactor(docker)!: change test service configuration and add a main service for normal usage
1 parent 6caee7d commit b6d6943

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

docker-compose.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
services:
2-
no-sast:
3-
image: cstools_no-sast
2+
main:
3+
image: codesectools-main
44
build:
55
context: .
6-
dockerfile: tests/Dockerfile
7-
target: no-sast
6+
dockerfile: Dockerfile
7+
8+
args:
9+
UID: "${UID:-1000}"
10+
GID: "${GID:-1000}"
811

912
tty: true
1013
stdin_open: true
1114

12-
volumes:
13-
- pytest-cache:/app/.pytest_cache
14-
- cstools-cache:/root/.codesectools/cache
15+
working_dir: /home/codesectools
1516

16-
environment:
17-
_TYPER_STANDARD_TRACEBACK: 1
18-
19-
with-sast:
20-
image: cstools_with-sast
17+
command: /bin/bash
18+
test:
19+
image: codesectools-test
2120
build:
2221
context: .
23-
dockerfile: tests/Dockerfile
24-
target: with-sast
22+
dockerfile: Dockerfile
23+
24+
args:
25+
UID: "${UID:-1000}"
26+
GID: "${GID:-1000}"
2527

2628
tty: true
2729
stdin_open: true
2830

29-
volumes:
30-
- pytest-cache:/app/.pytest_cache
31-
- cstools-cache:/root/.codesectools/cache
31+
volumes:
32+
- ./tests:/app/tests:ro
3233

34+
working_dir: /app
35+
3336
environment:
3437
_TYPER_STANDARD_TRACEBACK: 1
38+
39+
command: pytest
3540

3641
volumes:
37-
pytest-cache:
3842
cstools-cache:

0 commit comments

Comments
 (0)