For developers
Project configuration
Example: Drupal
1min
YAML
1clusterName: unicorn
2clusterRegion: eu-west-2
3projectName: example
4
5applications:
6 backend:
7 type: php:nginx
8 appRoot: ./drupal
9 extraBuildDependencies:
10 - ./.circleci
11
12 nginx:
13 version: 1.25
14 environmentVariables:
15 NGINX_SERVER_ROOT: /var/www/html/web
16 NGINX_VHOST_PRESET: drupal10
17 NGINX_ERROR_404_URI: /sites/default/misc/404.html
18
19 php:
20 version: 8.3
21 environmentVariables:
22 DRUSH_OPTIONS_URI: "https://{{ backend.host.0 }}"
23 BACKEND_HOST: "{{ backend.host.0 }}"
24 APPLICATION_MODE: development
25 hooks:
26 build: |
27 set -eu
28 composer install --no-interaction
29
30 database:
31 type: mysql
32 excludeTablesFromImportOnDevEnvs:
33 - cache%
34 - sessions
35 - user%
36
37 crontab:
38 enabled: true
39 jobs:
40 - schedule: "15 */6 * * *"
41 command: drush cron
42
43 persistentStorages:
44 public:
45 path: web/sites/default/files
46 syncArgsForDevEnvs: --exclude=styles/* --exclude=css/* --exclude=js/*
47 private:
48 path: private
49 syncArgsForDevEnvs: --exclude=twig/*
50 tmp: tmp
51
52 overrides:
53
54 - condition:
55 environments: [ stage ]
56 php:
57 environmentVariables:
58 APPLICATION_MODE: stage
59
60 - condition:
61 environments: [ production ]
62 hosts:
63 - example.com
64 php:
65 environmentVariables:
66 APPLICATION_MODE: production
67 crontab:
68 jobs:
69 - schedule: "0 */1 * * *"
70 command: drush cron
71