fix(containers): 🔊 Set log output to stdout

Let the docker handle logs. https://12factor.net/logs motivated me to do this
This commit is contained in:
Alexander Minkin 2023-10-03 01:49:39 +03:00
parent db8e9d183f
commit 6632d070f5
Signed by untrusted user: WerySkok
GPG key ID: 88E9A2F3AFE44C30
5 changed files with 1 additions and 11 deletions

View file

@ -8,6 +8,5 @@
Require all granted Require all granted
</Directory> </Directory>
ErrorLog /var/log/openvk/error.log LogFormat combinedio
CustomLog /var/log/openvk/access.log combinedio
</VirtualHost> </VirtualHost>

View file

@ -8,7 +8,6 @@ do
chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/audios chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/audios
chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/photos chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/photos
chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/videos chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/videos
chown -R 33:33 /var/log/openvk
sleep 600 sleep 600
done done

View file

@ -12,7 +12,6 @@ services:
- openvk-audios:/opt/chandler/extensions/available/openvk/tmp/api-storage/audios - openvk-audios:/opt/chandler/extensions/available/openvk/tmp/api-storage/audios
- openvk-photos:/opt/chandler/extensions/available/openvk/tmp/api-storage/photos - openvk-photos:/opt/chandler/extensions/available/openvk/tmp/api-storage/photos
- openvk-videos:/opt/chandler/extensions/available/openvk/tmp/api-storage/videos - openvk-videos:/opt/chandler/extensions/available/openvk/tmp/api-storage/videos
- openvk-logs:/var/log/openvk
- ./openvk.yml:/opt/chandler/extensions/available/openvk/openvk.yml:ro - ./openvk.yml:/opt/chandler/extensions/available/openvk/openvk.yml:ro
- ./chandler.yml:/opt/chandler/chandler.yml:ro - ./chandler.yml:/opt/chandler/chandler.yml:ro
depends_on: depends_on:
@ -32,7 +31,6 @@ services:
- openvk-audios:/opt/chandler/extensions/available/openvk/tmp/api-storage/audios - openvk-audios:/opt/chandler/extensions/available/openvk/tmp/api-storage/audios
- openvk-photos:/opt/chandler/extensions/available/openvk/tmp/api-storage/photos - openvk-photos:/opt/chandler/extensions/available/openvk/tmp/api-storage/photos
- openvk-videos:/opt/chandler/extensions/available/openvk/tmp/api-storage/videos - openvk-videos:/opt/chandler/extensions/available/openvk/tmp/api-storage/videos
- openvk-logs:/var/log/openvk
- ./acl_handler.sh:/bin/acl_handler.sh:ro - ./acl_handler.sh:/bin/acl_handler.sh:ro
mariadb-primary: mariadb-primary:

View file

@ -48,7 +48,6 @@ RUN ln -s /opt/chandler/extensions/available/commitcaptcha/ /opt/chandler/extens
ln -s /opt/chandler/extensions/available/openvk/install/automated/common/10-openvk.conf /etc/apache2/sites-enabled/10-openvk.conf && \ ln -s /opt/chandler/extensions/available/openvk/install/automated/common/10-openvk.conf /etc/apache2/sites-enabled/10-openvk.conf && \
a2enmod rewrite a2enmod rewrite
VOLUME [ "/var/log/openvk" ]
VOLUME [ "/opt/chandler/extensions/available/openvk/storage" ] VOLUME [ "/opt/chandler/extensions/available/openvk/storage" ]
VOLUME [ "/opt/chandler/extensions/available/openvk/tmp/api-storage/audios" ] VOLUME [ "/opt/chandler/extensions/available/openvk/tmp/api-storage/audios" ]
VOLUME [ "/opt/chandler/extensions/available/openvk/tmp/api-storage/photos" ] VOLUME [ "/opt/chandler/extensions/available/openvk/tmp/api-storage/photos" ]

View file

@ -38,13 +38,10 @@ items:
chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/audios chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/audios
chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/photos chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/photos
chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/videos chown -R 33:33 /opt/chandler/extensions/available/openvk/tmp/api-storage/videos
chown -R 33:33 /var/log/openvk
sleep 600 sleep 600
done done
volumeMounts: volumeMounts:
- mountPath: /var/log/openvk
name: openvk-logs
- mountPath: /opt/chandler/extensions/available/openvk/storage - mountPath: /opt/chandler/extensions/available/openvk/storage
name: openvk-storage name: openvk-storage
- mountPath: /opt/chandler/extensions/available/openvk/tmp/api-storage/audios - mountPath: /opt/chandler/extensions/available/openvk/tmp/api-storage/audios
@ -66,8 +63,6 @@ items:
cpu: 100m cpu: 100m
memory: 512Mi memory: 512Mi
volumeMounts: volumeMounts:
- mountPath: /var/log/openvk
name: openvk-logs
- mountPath: /opt/chandler/extensions/available/openvk/openvk.yml - mountPath: /opt/chandler/extensions/available/openvk/openvk.yml
name: openvk-config name: openvk-config
subPath: openvk.yml subPath: openvk.yml