File tree Expand file tree Collapse file tree 6 files changed +34
-16
lines changed Expand file tree Collapse file tree 6 files changed +34
-16
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,10 @@ jobs:
12
12
docker_layer_caching : true
13
13
- run : ls -l $(ls)
14
14
- run : bash ./build_github.sh
15
- - cypress/install :
16
- package-manager : npm
17
- working-directory : test
18
- - cypress/run-tests :
19
- cypress-command : npx wait-on@latest http://localhost:8089 && cd test && npx cypress run
20
- working-directory : test
15
+ - run : docker ps --format "table {{.Names}}\t{{.Ports}}" && docker compose ps
16
+ - run : docker-compose up --build --no-deps -d test
17
+ - run : docker compose exec test npx cypress run
18
+
21
19
workflows :
22
20
use-my-orb :
23
21
jobs :
Original file line number Diff line number Diff line change 12
12
13
13
source .env
14
14
15
+
16
+ # Create temporary container to copy nginx config
17
+ docker volume create project_nginx_conf
18
+ docker container create --name nginx_tmp -v project_nginx_conf:/etc/nginx/conf.d alpine
19
+ docker cp nginx/default.conf nginx_tmp:/etc/nginx/conf.d/
20
+ docker compose exec nginx nginx -s reload
21
+ docker rm nginx_tmp
22
+
15
23
# Run Docker Compose without local volumes
16
- docker-compose up --build --no-deps -d
24
+ docker-compose --profile core up --build --no-deps -d
Original file line number Diff line number Diff line change 2
2
source ./setup_local.sh
3
3
4
4
# Run Docker Compose
5
- docker-compose -f docker-compose.local.yaml up --build
5
+ docker-compose --profile core - f docker-compose.local.yaml up --build -d
Original file line number Diff line number Diff line change 1
1
services :
2
2
frontend :
3
3
build : ${FRONTEND_BUILD_CONTEXT}
4
+ profiles : ["core", "test"]
4
5
ports :
5
6
- 3000
6
7
networks :
@@ -10,6 +11,7 @@ services:
10
11
- WDS_SOCKET_PORT=${WDS_SOCKET_PORT}
11
12
api :
12
13
build : ${API_BUILD_CONTEXT}
14
+ profiles : ["core", "test"]
13
15
ports :
14
16
- 3000
15
17
networks :
@@ -30,6 +32,7 @@ services:
30
32
condition : service_healthy
31
33
db :
32
34
image : postgres
35
+ profiles : ["core", "test"]
33
36
ports :
34
37
- 5432
35
38
networks :
@@ -47,6 +50,7 @@ services:
47
50
retries : 3
48
51
backend :
49
52
build : ${BACKEND_BUILD_CONTEXT}
53
+ profiles : ["core", "test"]
50
54
ports :
51
55
- 3000
52
56
environment :
@@ -56,10 +60,11 @@ services:
56
60
- app-network
57
61
nginx :
58
62
image : nginx:alpine
63
+ profiles : ["core", "test"]
59
64
ports :
60
65
- 8089:80
61
66
volumes :
62
- - ./nginx/default.conf :/etc/nginx/conf.d/default.conf
67
+ - nginx_conf :/etc/nginx/conf.d
63
68
depends_on :
64
69
- api
65
70
- frontend
@@ -71,10 +76,24 @@ services:
71
76
interval : 10s
72
77
timeout : 5s
73
78
retries : 3
79
+ test :
80
+ build : ./test
81
+ profiles : ["test"]
82
+ environment :
83
+ - CYPRESS_BASE_URL=http://nginx:80
84
+ networks :
85
+ - app-network
86
+ depends_on :
87
+ - frontend
88
+ - backend
89
+ - api
90
+ - db
91
+ - nginx
74
92
75
93
networks :
76
94
app-network :
77
95
driver : bridge
78
96
79
97
volumes :
80
98
postgres_data :
99
+ nginx_conf :
Original file line number Diff line number Diff line change 1
1
FROM ghcr.io/perfetti/react1-app:latest as react-app
2
2
3
3
FROM nginx:alpine
4
- COPY --from=react-app /usr/share/nginx/html /react-app
5
4
COPY default.conf /etc/nginx/conf.d/default.conf
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments