Skip to content

Commit ac022c5

Browse files
author
Rahul Kumar Yadav
committed
ci : fixes in dokcercompose in volumes.
1 parent 459a07a commit ac022c5

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

Access/background_task_manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,4 +326,3 @@ def revoke_request(user_access_mapping, revoker=None):
326326
if result:
327327
return True
328328
return False
329-

Access/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ def update_revoker(self, revoker):
266266
self.save()
267267

268268
def offboard(self, revoker):
269-
self.state = "offboarding"
270-
self.revoker = revoker
269+
self.change_state("offboarding")
270+
self.update_revoker(revoker)
271271
self.offbaord_date = datetime.datetime.now()
272272
self.user.is_active = False
273273
self.save()

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ RUN mkdir -p logs
2121
RUN chown -R app /srv/code/dev
2222
USER app
2323

24+
25+
2426
# Copy just requirements.txt
2527
COPY requirements.txt /tmp/requirements.txt
2628
COPY config.json.sample config.json
@@ -29,7 +31,6 @@ COPY config.json.sample config.json
2931
RUN pip install -r /tmp/requirements.txt --no-cache-dir --ignore-installed
3032

3133
COPY --chown=app:root . .
32-
3334
FROM base as test
3435
CMD ["python" "-m", "pytest", "-v", "--cov", "--disable-warnings" ]
3536

docker-compose.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ version: '3'
33
services:
44
web:
55
container_name: dev
6-
image: ${DOCKERIMAGE}
76
build:
87
context: .
98
dockerfile: Dockerfile
109
target: web
1110
env_file:
1211
- ./secrets/ops_app_dev.env
1312
volumes:
14-
- .:/srv/code/dev
1513
- ./mounts/logs/:/ebs/logs/
1614
ports:
1715
- 8000:8000
@@ -42,9 +40,7 @@ services:
4240
image: redis:alpine
4341
command: --port 6379
4442
ports:
45-
- "6379:6379"
46-
expose:
47-
- "6379"
43+
- "6381:6379"
4844

4945
celery:
5046
container_name: celery

scripts/clone_access_modules.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@
2727
and file != ".github"
2828
and file != "secrets"
2929
) :
30+
try :
3031
os.rename(
3132
folder_path + "/" + file, "./Access/access_modules/" + file
3233
)
34+
except:
35+
print("File is already present.")
3336

3437
if(file == "requirements.txt"):
3538
current_requirements_file = folder_path + "/" + file
@@ -50,8 +53,8 @@
5053

5154
print("Cloning successful!")
5255
except Exception as e:
53-
print(e)
54-
print("failed cloning " + folder_name + ".")
56+
print("error-->",e)
57+
print("failed cloning " + folder_name + ".")
5558

5659
# remove the cloned repo folder entirely with all its contents which
5760
# includes folders and files using shutil.rmtree()

0 commit comments

Comments
 (0)