-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.yml
105 lines (94 loc) · 2.24 KB
/
test.yml
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
version: "3.9"
############################# NETWORKS
networks:
test_selab_network:
name: test_selab_network
driver: bridge
ipam:
config:
- subnet: 192.168.92.0/24
############################# EXTENSIONS
x-common-keys-selab_test: &common-keys-selab_test
networks:
- test_selab_network
security_opt:
- no-new-privileges:true
restart: "no"
environment:
TZ: $TZ
PUID: $PUID
PGID: $PGID
env_file:
- .env
dns:
- 1.1.1.1
- 4.4.4.4
- 8.8.8.8
############################# SERVICES
services:
nginx:
<<: *common-keys-selab_test
image: nginx:alpine-slim
container_name: nginx
volumes:
- ${DATA_DIR}/nginx/nginx.test.conf:/etc/nginx/nginx.conf:ro
- ${SSL_DIR}:/etc/nginx/ssl:ro
depends_on:
- backend
- frontend
backend:
<<: *common-keys-selab_test
container_name: backend
build:
context: $BACKEND_DIR
dockerfile: Dockerfile.dev
command: sh -c "./setup.sh && python manage.py runsslserver 0.0.0.0:8000"
environment:
- DJANGO_TESTING=true
volumes:
- $BACKEND_DIR:/code
depends_on:
- redis
celery:
<<: *common-keys-selab_test
container_name: celery
build:
context: $BACKEND_DIR
dockerfile: Dockerfile.dev
command: sh -c "./setup.sh && celery -A ypovoli worker -l DEBUG"
volumes:
- $BACKEND_DIR:/code
depends_on:
- backend
- redis
frontend:
<<: *common-keys-selab_test
container_name: frontend
build:
context: $FRONTEND_DIR
dockerfile: Dockerfile.dev
command: sh -c "npm install && npm run host"
volumes:
- $FRONTEND_DIR:/app
depends_on:
- backend
redis:
<<: *common-keys-selab_test
container_name: redis
image: redis:latest
entrypoint: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
volumes:
- ${DATA_DIR}/redis:/data
cypress:
<<: *common-keys-selab_test
container_name: cypress
build:
context: $FRONTEND_DIR
dockerfile: Dockerfile.cypress
command: sh -c "npm install && npm run cypress:test"
working_dir: /e2e
volumes:
- ${FRONTEND_DIR}:/e2e
- /e2e/node_modules
depends_on:
- frontend