forked from rccypher/RapidCopy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.qa.yml
More file actions
171 lines (163 loc) · 5.34 KB
/
docker-compose.qa.yml
File metadata and controls
171 lines (163 loc) · 5.34 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# RapidCopy QA Test Environment
#
# This compose file sets up a complete QA environment for testing ALL features:
# - RapidCopy backend + frontend
# - Mock remote SSH server (simulates seedbox)
# - NFS server for network mount testing
# - SMB/CIFS server for Windows share testing
#
# Usage:
# docker-compose -f docker-compose.qa.yml up --build
#
# Access:
# - RapidCopy UI: http://localhost:8800
# - Remote SSH: localhost:1234 (user: remoteuser, pass: remotepass)
#
# Pre-configured settings will be applied automatically.
services:
# ============================================================================
# RapidCopy Application (Backend + Frontend)
# ============================================================================
rapidcopy:
build: .
image: rapidcopy:qa
container_name: rapidcopy-qa
restart: unless-stopped
ports:
- "8800:8800"
# Required for network mount support (NFS/SMB/CIFS)
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
privileged: true # Required for mount operations
volumes:
- rapidcopy-config:/config
- rapidcopy-downloads:/downloads
- rapidcopy-mounts:/mounts:shared
depends_on:
remote:
condition: service_started
configure:
condition: service_completed_successfully
environment:
- UPDATE_TOKEN=qa-test-token-12345
- UPDATE_SERVER_URL=http://host.docker.internal:8801
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- rapidcopy-qa
# ============================================================================
# Mock Remote SSH Server (Simulates Seedbox/Remote Server)
# ============================================================================
# Provides test files for download testing
# SSH credentials: remoteuser / remotepass
# Remote path: /home/remoteuser/files
remote:
build:
context: .
dockerfile: src/docker/test/e2e/remote/Dockerfile
image: rapidcopy-qa/remote
container_name: rapidcopy-qa-remote
ports:
- "1234:1234"
networks:
- rapidcopy-qa
# ============================================================================
# Configuration Service
# ============================================================================
# Automatically configures RapidCopy to connect to the remote server
configure:
build:
context: .
dockerfile: src/docker/test/e2e/configure/Dockerfile
image: rapidcopy-qa/configure
container_name: rapidcopy-qa-configure
depends_on:
- remote
volumes:
- rapidcopy-config:/config
environment:
- REMOTE_ADDRESS=remote
- REMOTE_PORT=1234
- REMOTE_USER=remoteuser
- REMOTE_PASS=remotepass
- REMOTE_PATH=/home/remoteuser/files
- LOCAL_PATH=/downloads
networks:
- rapidcopy-qa
# ============================================================================
# NFS Server (for Network Mount Testing)
# ============================================================================
# Exports /data as an NFS share
# Mount from RapidCopy: nfs-server:/data
nfs-server:
image: itsthenetwork/nfs-server-alpine:12
container_name: rapidcopy-qa-nfs
privileged: true
environment:
- SHARED_DIRECTORY=/data
- SYNC=true
volumes:
- nfs-data:/data
ports:
- "2049:2049"
networks:
- rapidcopy-qa
# ============================================================================
# SMB/CIFS Server (for Windows Share Testing)
# ============================================================================
# Share name: public (guest access)
# Share name: private (user: smbuser, pass: smbpass)
smb-server:
image: dperson/samba:latest
container_name: rapidcopy-qa-smb
environment:
- USER=smbuser;smbpass
- SHARE=public;/share/public;yes;no;yes;all
- SHARE2=private;/share/private;yes;no;no;smbuser
volumes:
- smb-public:/share/public
- smb-private:/share/private
ports:
- "445:445"
- "139:139"
networks:
- rapidcopy-qa
# ============================================================================
# Playwright Test Runner (Optional - for automated E2E tests)
# ============================================================================
# Run with: docker-compose -f docker-compose.qa.yml run playwright
playwright:
build:
context: ./src/e2e-playwright
dockerfile: Dockerfile.qa
image: rapidcopy-qa/playwright
container_name: rapidcopy-qa-playwright
profiles:
- testing # Only starts when explicitly requested
depends_on:
- rapidcopy
environment:
- RAPIDCOPY_URL=http://rapidcopy:8800
volumes:
- ./src/e2e-playwright/test-results:/app/test-results
- ./src/e2e-playwright/playwright-report:/app/playwright-report
networks:
- rapidcopy-qa
# ============================================================================
# Networks
# ============================================================================
networks:
rapidcopy-qa:
driver: bridge
# ============================================================================
# Volumes
# ============================================================================
volumes:
rapidcopy-config:
rapidcopy-downloads:
rapidcopy-mounts:
nfs-data:
smb-public:
smb-private: