mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Move docker files, include kubernetes files.
This commit is contained in:
82
.deploy/kubernetes/firefly.yaml
Normal file
82
.deploy/kubernetes/firefly.yaml
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mysql-pv-export-claim
|
||||||
|
labels:
|
||||||
|
app: firefly-local
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mysql-pv-upload-claim
|
||||||
|
labels:
|
||||||
|
app: firefly-local
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: firefly-local
|
||||||
|
namespace: firefly
|
||||||
|
labels:
|
||||||
|
app: firefly-local
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: firefly-local
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: firefly-local
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: firefly-local
|
||||||
|
name: firefly-local
|
||||||
|
env:
|
||||||
|
- name: FF_APP_ENV
|
||||||
|
value: "local"
|
||||||
|
- name: FF_APP_KEY
|
||||||
|
value: "S0m3R@nd0mString0f32Ch@rsEx@ct1y"
|
||||||
|
- name: FF_DB_HOST
|
||||||
|
value: "172.17.0.9"
|
||||||
|
- name: FF_DB_NAME
|
||||||
|
value: "firefly_db"
|
||||||
|
- name: FF_DB_USER
|
||||||
|
value: "firefly_db"
|
||||||
|
- name: FF_DB_PASSWORD
|
||||||
|
value: "password"
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: "/var/www/firefly-iii/storage/export"
|
||||||
|
name: mysql-persistent-export
|
||||||
|
- mountPath: "/var/www/firefly-iii/storage/upload"
|
||||||
|
name: mysql-persistent-upload
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
volumes:
|
||||||
|
- name: mysql-persistent-export
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mysql-pv-export-claim
|
||||||
|
- name: mysql-persistent-upload
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mysql-pv-upload-claim
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: firefly-local
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: firefly-local
|
49
.deploy/kubernetes/sql.yaml
Normal file
49
.deploy/kubernetes/sql.yaml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: sql-pass
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
password: cGFzc3dvcmQ=
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mysql
|
||||||
|
namespace: firefly
|
||||||
|
labels:
|
||||||
|
app: mysql
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mysql
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mysql
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: mysql
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: mysql
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: sql-pass
|
||||||
|
key: password
|
||||||
|
ports:
|
||||||
|
- containerPort: 3306
|
||||||
|
name: mysql
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mysql
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 3306
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: mysql
|
||||||
|
|
@@ -31,7 +31,7 @@ RUN docker-php-ext-install -j$(nproc) curl gd intl json readline tidy zip bcmath
|
|||||||
RUN echo "de_DE.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
|
RUN echo "de_DE.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
|
||||||
|
|
||||||
# copy Apache config to correct spot.
|
# copy Apache config to correct spot.
|
||||||
COPY ./docker/apache2.conf /etc/apache2/apache2.conf
|
COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf
|
||||||
|
|
||||||
# Enable apache mod rewrite..
|
# Enable apache mod rewrite..
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
@@ -46,7 +46,7 @@ VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload
|
|||||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
# Enable default site (Firefly III)
|
# Enable default site (Firefly III)
|
||||||
COPY ./docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
|
COPY ./.deploy/docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
# Make sure we own Firefly III directory
|
# Make sure we own Firefly III directory
|
||||||
RUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage
|
RUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage
|
||||||
@@ -58,4 +58,4 @@ RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest
|
|||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Run entrypoint thing
|
# Run entrypoint thing
|
||||||
ENTRYPOINT ["docker/entrypoint.sh"]
|
ENTRYPOINT [".deploy/docker/entrypoint.sh"]
|
Reference in New Issue
Block a user