Revision #250 has been created by rackycz on Jan 1, 2021, 6:06:50 PM with the memo:
Gitlab
« previous (#249) next (#251) »
Changes
Title
unchanged
Yii v2 snippet guide
Category
unchanged
Tutorials
Yii version
unchanged
2.0
Tags
unchanged
tutorial,beginner,yii2
Content
changed
[...]
**Automatical copying from GitLab to FTP**
---
I found these two pages where things are explained: [link](https://www.savjee.be/2019/04/gitlab-ci-deploy-to-ftp-with-lftp/) [link](https://stackoverflow.com/questions/49632077/use-gitlab-pipeline-to-push-data-to-ftpserver) and I just copied something.
You
only need to create
1 file
in your GitLab repository. It is named .gitlab-ci.yml and it should contain following code:.gitlab-ci.yml in the root of your repository with this content. It will fire a Pipeline job on commit.
```[...]
```
I just added some exclusions (listed belowsee the code) and will probably add **--delete** in the future. Read linked webs.
- exclude vendor = huge folder with 3rd party SW which is not in GIT
- exclude web/assets = also some cache
- exclude web/index.php = in GIT is your devel index with DEBUG mode enabled. You dont wanna have this file in productive environment
- exclude web/index-test.php = tests are only on your computer and in GIT
.
**Important info:** Your FTP server might block foreign IPs. If this happens, your transfer will fail with error 530. You must findout GitLab's IPs and whitelist them. [This link]( https://docs.gitlab.com/ee/user/gitlab_com/#ip-range) might help.
**User management + DB creation + login via DB**
---
To create DB with users, use following command. I recommend charset **utf8_unicode_ci** (or utf8mb4_unicode_ci) as it allows you to use [more international characters](https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci).[...]