Skip to content

Commit b94154f

Browse files
committed
chore(dir): remove staging&testing
1 parent d3ba7b7 commit b94154f

21 files changed

+12
-517
lines changed

.gitattributes

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
* text=auto
22

3-
/tests export-ignore
43
/.github export-ignore
54
.gitattributes export-ignore
65
.scrutinizer.yml export-ignore
76
.styleci.yml export-ignore
8-
.codeclimate.yml export-ignore
97
.travis.yml export-ignore
10-
phpunit.xml.dist export-ignore
11-
/README.md
12-
/README-cn.md
8+
/README.md export-ignore
9+
/README-cn.md export-ignore

.gitlab-ci.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -204,50 +204,11 @@ production-image:
204204
- docker rmi $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
205205
only:
206206
- tags
207-
testing-server:
208-
stage: deploy
209-
variables:
210-
DEPLOY_SERVER: "$TESTING_SERVER"
211-
dependencies: []
212-
cache: {}
213-
script:
214-
- cd deploy/testing
215-
- rsync -rtvhze ssh . root@$DEPLOY_SERVER:/data/$CI_PROJECT_NAME --stats
216-
- CHOWN_DIR="frontend/runtime frontend/web/assets frontend/web/uploads backend/runtime backend/web/assets backend/rbac console/runtime api/runtime api/web/assets"
217-
- ssh root@$DEPLOY_SERVER "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY"
218-
- ssh root@$DEPLOY_SERVER "export COMPOSE_HTTP_TIMEOUT=120 && export DOCKER_CLIENT_TIMEOUT=120 && export TAG=$CI_COMMIT_TAG && cd /data/$CI_PROJECT_NAME && docker-compose pull web && docker-compose stop && docker-compose rm -f && docker-compose up -d --build"
219-
- ssh root@$DEPLOY_SERVER "docker exec -i $CI_PROJECT_NAME chown www-data:www-data $CHOWN_DIR"
220-
- ssh root@$DEPLOY_SERVER "docker exec -i $CI_PROJECT_NAME ./yii migrate/up --interactive=0"
221-
only:
222-
- develop
223-
environment:
224-
name: testing
225-
url: http://$DEPLOY_SERVER
226-
when: manual
227-
staging-server:
228-
stage: deploy
229-
variables:
230-
DEPLOY_SERVER: "$STAGING_SERVER"
231-
dependencies: []
232-
cache: {}
233-
script:
234-
- cd deploy/staging
235-
- rsync -rtvhze ssh . root@$DEPLOY_SERVER:/data/$CI_PROJECT_NAME --stats
236-
- CHOWN_DIR="frontend/runtime frontend/web/assets frontend/web/uploads backend/runtime backend/web/assets backend/rbac console/runtime api/runtime api/web/assets"
237-
- ssh root@$DEPLOY_SERVER "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY"
238-
- ssh root@$DEPLOY_SERVER "export COMPOSE_HTTP_TIMEOUT=120 && export DOCKER_CLIENT_TIMEOUT=120 && export TAG=$CI_COMMIT_TAG && cd /data/$CI_PROJECT_NAME && docker-compose pull web && docker-compose stop && docker-compose rm -f && docker-compose up -d --build"
239-
- ssh root@$DEPLOY_SERVER "docker exec -i $CI_PROJECT_NAME chown www-data:www-data $CHOWN_DIR"
240-
- ssh root@$DEPLOY_SERVER "docker exec -i $CI_PROJECT_NAME ./yii migrate/up --interactive=0"
241-
only:
242-
- master
243-
environment:
244-
name: staging
245-
url: http://$DEPLOY_SERVER
246207
production-server:
247208
stage: deploy
248209
image: alpine
249210
variables:
250-
DEPLOY_SERVER: "$STAGING_SERVER"
211+
DEPLOY_SERVER: "$PRODUCTION_SERVER"
251212
dependencies: []
252213
script:
253214
- cd deploy/production

deploy/development/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

deploy/production/docker-compose.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,21 @@ services:
1414
- ./data/frontend/runtime:/var/www/html/frontend/runtime
1515
- ./data/frontend/web/assets:/var/www/html/frontend/web/assets
1616
- ./data/frontend/web/uploads:/var/www/html/frontend/web/uploads
17-
links:
18-
- mysql
1917
environment:
2018
ENABLE_ENV_FILE: 1
2119
ENABLE_LOCALCONF: 1
2220
API_TOKEN: "47591fb1175145933b20f80d89c9da0381e9339a"
2321
expose:
2422
- 9000
23+
restart: always
2524

2625
nginx:
27-
build: ./services/nginx
26+
image: zacksleo/nginx:yii2
2827
ports:
29-
- "443:443"
28+
- "80:80"
3029
links:
3130
- web
3231
volumes_from:
3332
- web
34-
35-
mysql:
36-
image: mysql:5.6
37-
expose:
38-
- "3306"
39-
environment:
40-
MYSQL_ROOT_PASSWORD: root
41-
MYSQL_DATABASE: web
42-
MYSQL_USER: web
43-
MYSQL_PASSWORD: web
44-
volumes:
45-
- ./data/mysql:/var/lib/mysql
46-
- ./services/mysql/mysql.cfg:/etc/mysql/conf.d/mysql.cfg
47-
# Autostart at boottime
48-
#restart: always
33+
restart: always
4934

deploy/production/services/mysql/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

deploy/production/services/mysql/mysql.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

deploy/production/services/nginx/Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

deploy/production/services/nginx/nginx.conf

Lines changed: 0 additions & 89 deletions
This file was deleted.

deploy/staging/.env

Lines changed: 0 additions & 30 deletions
This file was deleted.

deploy/staging/docker-compose.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

deploy/staging/services/mysql/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

deploy/staging/services/mysql/mysql.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

deploy/staging/services/nginx/Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)