Skip to content

Commit 32c3fe2

Browse files
add prod settings and chart
1 parent 496e228 commit 32c3fe2

18 files changed

+748
-68
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
vendor
3+
node_modules
4+
tests
5+
var

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ node_modules
4343

4444
# System files
4545
.DS_Store
46+
47+
deploy/secrets.yaml
48+
deploy/charts

Dockerfile

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# install php dependencies in intermediate container
2+
FROM composer:latest AS composer
3+
4+
WORKDIR /var/www/html
5+
6+
RUN composer global require hirak/prestissimo --no-plugins --no-scripts
7+
8+
COPY composer.* /var/www/html/
9+
RUN composer install --apcu-autoloader -o --no-dev --no-scripts --ignore-platform-reqs
10+
11+
# build actual application image
12+
FROM php:7.4-apache
13+
14+
WORKDIR /var/www/html
15+
16+
# install packages
17+
# inkscape is recommended for handling svg files with imagemagick
18+
RUN apt-get update && apt-get install -y \
19+
libicu-dev \
20+
libpng-dev \
21+
libmagickwand-dev \
22+
inkscape
23+
24+
# install PHP extensions
25+
RUN docker-php-ext-configure intl && docker-php-ext-install -j$(nproc) \
26+
intl \
27+
pdo \
28+
pdo_mysql
29+
30+
RUN pecl install redis apcu imagick && docker-php-ext-enable redis apcu imagick
31+
32+
# apache config
33+
RUN /usr/sbin/a2enmod rewrite && /usr/sbin/a2enmod headers && /usr/sbin/a2enmod expires
34+
35+
# copy needed files from build containers
36+
COPY --from=composer /var/www/html/vendor/ /var/www/html/vendor/
37+
38+
COPY . /var/www/html/
39+
40+
# php config
41+
ADD ./deploy/config/php.ini /usr/local/etc/php/conf.d/custom.ini
42+
43+
# apache config
44+
COPY ./deploy/config/apache.conf /etc/apache2/sites-available/000-default.conf

README.md

+29-54
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,45 @@
1-
<br/>
2-
<p align="center">
3-
<a href="https://sulu.io/" target="_blank">
4-
<img width="50%" src="https://sulu.io/website/images/sulu.svg" alt="Sulu logo">
5-
</a>
6-
</p>
1+
# Sulu Cluster
72

8-
<br/>
9-
<p align="center">
10-
<a href="https://github.com/sulu/skeleton/blob/master/LICENSE" target="_blank">
11-
<img src="https://img.shields.io/github/license/sulu/skeleton.svg" alt="GitHub license">
12-
</a>
13-
<a href="https://github.com/sulu/skeleton/releases" target="_blank">
14-
<img src="https://img.shields.io/github/tag/sulu/skeleton.svg" alt="GitHub tag (latest SemVer)">
15-
</a>
16-
<a href="https://travis-ci.org/sulu/skeleton" target="_blank">
17-
<img src="https://img.shields.io/travis/sulu/skeleton.svg?label=travis" alt="Travis build">
18-
</a>
19-
</p>
20-
<br/>
3+
1. Build your container
214

22-
[Sulu](https://sulu.io/) is a highly extensible open-source **PHP content management system based** on the [Symfony](https://symfony.com/) framework. Sulu is developed to deliver robust **multi-lingual and multi-portal websites** while providing an **intuitive and extensible administration interface** to manage the full content lifecycle.
23-
24-
Have a look at the official [Sulu website](https://sulu.io/) for a comprehensive list of Sulus features, core values and use cases.
25-
26-
<br/>
27-
<p align="center">
28-
<img width="80%" src="https://sulu.io/uploads/media/800x@2x/07/167-ezgif.gif?v=2" alt="Sulu Slideshow">
29-
</p>
30-
<br/>
31-
32-
This repository provides the recommended **project template for starting your new project based on the Sulu content management system**.
33-
The project template follows the best-practices of the [Symfony](https://symfony.com/) framework and builds upon tho official [symfony/skeleton](https://github.com/symfony/skeleton) template. In addition, it requires and configures the Sulu content management system core framework [sulu/sulu](https://github.com/sulu/sulu).
34-
35-
If you want to **extend your already set up Sulu project**, visit the [Sulu organization](https://github.com/sulu) on GitHub for a complete list of official Sulu bundles.
36-
37-
38-
## 🚀&nbsp; Installation and Documentation
39-
40-
Starting a new Sulu project with the [sulu/skeleton](https://github.com/sulu/skeleton) template is as easy as executing the following [composer](https://getcomposer.org/) command:
41-
42-
```bash
43-
composer create-project sulu/skeleton my-project
5+
```
6+
docker build . -t eu.gcr.io/sulu-io/sulu-cluster:1.0.0
7+
docker push eu.gcr.io/sulu-io/sulu-cluster:1.0.0
448
```
459

46-
Afterwards, visit the official [Sulu documentation](http://docs.sulu.io/en/latest/book/getting-started.html) to find out **how to initialize and configure your project** to your specific needs.
47-
48-
49-
## ❤️&nbsp; Community and Contributions
10+
2. Create Cluster
5011

51-
The Sulu content management system is a **community-driven open source project** backed by various partner companies. We are committed to a fully transparent development process and **highly appreciate any contributions**. Whether you are helping us fixing bugs, proposing new feature, improving our documentation or spreading the word - **we would love to have you as part of the Sulu community**.
12+
```
13+
gcloud beta container --project "sulu-io" clusters create "my-first-cluster-1" --zone "europe-west3-c" --no-enable-basic-auth --cluster-version "1.15.12-gke.2" --release-channel "stable" --machine-type "g1-small" --image-type "COS" --disk-type "pd-standard" --disk-size "32" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "3" --no-enable-stackdriver-kubernetes --enable-ip-alias --network "projects/sulu-io/global/networks/default" --subnetwork "projects/sulu-io/regions/europe-west3/subnetworks/default" --default-max-pods-per-node "110" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0
14+
```
5215

16+
3. Connect to cluster
5317

54-
## 📫&nbsp; Have a question? Want to chat? Run into a problem?
18+
```
19+
gcloud container clusters get-credentials my-first-cluster-1 --zone europe-west3-c --project sulu-io
20+
```
5521

56-
We are happy to welcome you in our official [Slack channel](https://sulu.io/services-and-support)! Obviously you can always **reach out to us directly** via the [Sulu twitter account](https://twitter.com/sulu) or post your question on [StackOverflow](https://stackoverflow.com/questions/tagged/sulu) with the official `sulu` tag.
22+
4. Create service account
5723

24+
Download the key and add cloud-storage admin permissions to the service account in a bucket.
5825

59-
## 🤝&nbsp; Found a bug? Missing a specific feature?
26+
5. Configure secret values
6027

61-
Feel free to **file a new issue** with a respective title and description on the the [sulu/sulu](https://github.com/sulu/sulu/issues) repository. If you already found a solution to your problem, **we would love to review your pull request**! Have a look at our [contribution guidelines](http://docs.sulu.io/en/latest/developer/contributing/) to find out about our coding standards.
28+
Copy the `deploy/secrets.dist.yaml` to `deploy/secrets.yaml`.
6229

30+
Configure the redis password and the google cloud credentials in the secrets file.
6331

64-
## &nbsp; Requirements
32+
6. Install App
6533

66-
Sulu requires a **PHP version higher or equal to 7.2** and is compatible with every **Symfony version starting from 4.3**. Have a look at the `require` section in the [composer.json](https://github.com/sulu/sulu/blob/master/composer.json) of the [sulu/sulu](https://github.com/sulu/sulu) core framework to find an **up-to-date list of the requirements** of Sulu content management system.
34+
```
35+
cd deploy
36+
helm3 dep build
37+
helm3 install sulu-cluster . -f secrets.yaml
38+
```
6739

40+
7. Upgrade App
6841

69-
## 📘&nbsp; License
70-
The Sulu content management system is released under the under terms of the [MIT License](LICENSE).
42+
```
43+
cd deploy
44+
helm3 upgrade sulu-cluster . -f secrets.yaml
45+
```

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"handcraftedinthealps/zendsearch": "^2.0",
3535
"jackalope/jackalope-doctrine-dbal": "^1.3",
3636
"sulu/sulu": "~2.1.1",
37+
"superbalist/flysystem-google-storage": "^7.2",
3738
"symfony/config": "^5.1",
3839
"symfony/dotenv": "^5.1",
3940
"symfony/flex": "^1.2",

0 commit comments

Comments
 (0)