forked from MICHAL53Q/azure-devops-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
48 lines (46 loc) · 1.92 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: '3'
services:
git-backup:
build: .
container_name: git-backup
environment:
# Debug mode or not when in debug mode we need to expose the port and we can attach a debugger to the container
- DEBUG_MODE=${DEBUG_MODE:-0}
- COPY_ARCHIVES_TO_SHAREPOINT_ENABLED=${COPY_ARCHIVES_TO_SHAREPOINT_ENABLED:-1}
# Auth DevOps
- DEVOPS_PAT=${DEVOPS_PAT}
- DEVOPS_ORGANIZATION_URL=${DEVOPS_ORGANIZATION_URL}
# Auth SharePoint
- SHAREPOINT_URL=${SHAREPOINT_URL}
- SHAREPOINT_DIR=${SHAREPOINT_DIR}
- SHAREPOINT_CLIENT_ID=${SHAREPOINT_CLIENT_ID}
- SHAREPOINT_CLIENT_SECRET=${SHAREPOINT_CLIENT_SECRET}
# Paths
- PATH_CLONE=/mnt/backup/clone
- PATH_ARCHIVE=/mnt/backup/archive
# volumes:
# - ./app:/usr/src/app
# - ./tmp:/mnt/backup
# - ./tests:/usr/src/tests
volumes:
- ${PWD}/app:/usr/src/app
- ${PWD}/tmp2:/mnt/backup
- ${PWD}/tests:/usr/src/tests
# volumes:
# - "C:/Users/adudley/OneDrive - Gratte Brothers Ltd/dev/AzureBackup/azure-devops-backup/app:/usr/src/app"
# - "C:/temp/azbackuptemp:/mnt/backup"
# - "C:/Users/adudley/OneDrive - Gratte Brothers Ltd/dev/AzureBackup/azure-devops-backup/tests:/usr/src/tests"
# only have the below to run the container in detached mode debugging etc.
# and then use this to make it 'run'
# TERMINAL: docker-compose --env-file ./configs/test.env up --build -d
# TERMINAL: docker exec -it git-backup sh
# TERMINAL: python main.py
# then nvaigate inside the container and run the app python /usr/src/app/main.py
stdin_open: true
tty: true
command: tail -f /dev/null
# to debug the app inside the container - we need this port exposed
# TERMINAL: docker exec -it git-backup sh
# TERMINAL: python -m debugpy --listen 0.0.0.0:5678 /usr/src/app/main.py
ports:
- "5678:5678"