- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3.7
environment:
ALLOW_ANONYMOUS_LOGIN: yes
volumes:
- zookeeper_data:/bitnami
volumes:
zookeeper_data:
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 34
0
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3.7
environment:
ALLOW_ANONYMOUS_LOGIN: yes
volumes:
- zookeeper_data:/bitnami
volumes:
zookeeper_data:
Кто найдёт ошибку в docker-compose.yaml — тому нихуя.
+3
buf = malloc(8 * 1024);
snprintf(buf, 8 * 1024,
"{\n"
"\t\"tilejson\": \"2.0.0\",\n"
"\t\"schema\": \"xyz\",\n"
"\t\"name\": \"%s\",\n"
"\t\"description\": \"%s\",\n"
"\t\"attribution\": \"%s\",\n"
"\t\"minzoom\": %i,\n"
"\t\"maxzoom\": %i,\n"
"\t\"tiles\": [\n",
tile_config->xmlname, (tile_config->description ? tile_config->description : ""), tile_config->attribution, tile_config->minzoom, tile_config->maxzoom);
for (i = 0; i < tile_config->noHostnames; i++) {
strncat(buf, "\t\t\"", 8 * 1024 - strlen(buf) - 1);
strncat(buf, tile_config->hostnames[i], 8 * 1024 - strlen(buf) - 1);
strncat(buf, tile_config->baseuri, 8 * 1024 - strlen(buf) - 1);
strncat(buf, "{z}/{x}/{y}.", 8 * 1024 - strlen(buf) - 1);
strncat(buf, tile_config->fileExtension, 8 * 1024 - strlen(buf) - 1);
strncat(buf, "\"", 8 * 1024 - strlen(buf) - 1);
if (i < tile_config->noHostnames - 1) {
strncat(buf, ",", 8 * 1024 - strlen(buf) - 1);
}
strncat(buf, "\n", 8 * 1024 - strlen(buf) - 1);
}
strncat(buf, "\t]\n}\n", 8 * 1024 - strlen(buf) - 1);
len = strlen(buf);
/*
* Add HTTP headers. Make this file cachable for 1 week
*/
md5 = ap_md5_binary(r->pool, (unsigned char *)buf, len);
apr_table_setn(r->headers_out, "ETag",
apr_psprintf(r->pool, "\"%s\"", md5));
ap_set_content_type(r, "application/json");
ap_set_content_length(r, len);
apr_table_mergen(t, "Cache-Control",
apr_psprintf(r->pool, "max-age=%" APR_TIME_T_FMT,
maxAge));
timestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
apr_rfc822_date(timestr, (apr_time_from_sec(maxAge) + r->request_time));
apr_table_setn(t, "Expires", timestr);
ap_rwrite(buf, len, r);
free(buf);
https://github.com/openstreetmap/mod_tile/blob/master/src/mod_tile.c#L1212
+2
RUN apt install -y apache2
RUN apt install -y php
RUN apt install -y php-mysql
RUN apt install -y libapache2-mod-php
RUN apt install -y curl
RUN apt install -y php-mbstring
RUN apt install -y php-mysql
RUN apt install -y php7.4-sqlite3
RUN apt install -y php-gd
RUN apt install -y php-intl
RUN apt install -y php-xml
RUN apt install -y php-curl
#RUN apt install -y php7.0-ffmpeg
RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php/7.4/apache2/php.ini
RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php/7.4/cli/php.ini
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN echo "IncludeOptional /var/www/*.conf" >> /etc/apache2/apache2.conf
#RUN sed -i "s/<\/VirtualHost>/Проверка\n<\/VirtualHost>" /etc/apache2/apache2.conf
RUN sed -i "s/<\/VirtualHost>/\n\t<Directory \/var\/www\/html>\n\t<\/Directory>\n<\/VirtualHost>/g" /etc/apache2/sites-available/000-default.conf
RUN sed -i "s/<\/Directory>/\tOptions Indexes FollowSymLinks MultiViews\n\t<\/Directory>/g" /etc/apache2/sites-available/000-default.conf
RUN sed -i "s/<\/Directory>/\tAllowOverride All\n\t<\/Directory>/g" /etc/apache2/sites-available/000-default.conf
RUN sed -i "s/<\/Directory>/\tOrder allow,deny\n\t<\/Directory>/g" /etc/apache2/sites-available/000-default.conf
RUN sed -i "s/<\/Directory>/\tAllow from all\n\t<\/Directory>/g" /etc/apache2/sites-available/000-default.conf
RUN sed -i "s/<\/Directory>/\tRequire all granted\n\t<\/Directory>/g" /etc/apache2/sites-available/000-default.conf
RUN mv /etc/apache2/sites-enabled/000-default.conf /tmp
RUN cd /etc/apache2/sites-enabled/; ln -s ../sites-available/000-default.conf 000-default.conf
RUN a2enmod php7.4
RUN a2enmod rewrite
#RUM apt install -y certbot
#RUN a2enmod python-certbot-apache
#RUN a2enmod ssl
EXPOSE 80
EXPOSE 22
# <Directory /var/www/html>
# Options Indexes FollowSymLinks MultiViews
# AllowOverride All
# Order allow,deny
# Allow from all
# Require all granted
# </Directory>
RUN wget -O /var/www/html/index.phar https://github.com/mpak2/mpak.su/raw/master/phar/index.phar
RUN wget -O /var/www/html/.htaccess https://github.com/mpak2/mpak.su/raw/master/.htaccess
RUN wget -O /var/www/html/.htdb https://github.com/mpak2/mpak.su/raw/master/.htdb
RUN chown www-data /var/www/html/.htdb
RUN chown www-data /var/www/html
RUN mkdir /var/www/html/include
RUN mkdir /var/www/html/include/images
RUN chmod 0777 /var/www/html/include/images
RUN rm /var/www/html/index.html
https://github.com/mpak2/mpak.su/blob/654b7daf0b7d4f3c83385c0ca35fcab6a1ec45f7/phar/docker/www/Dockerfile
+4
#!/usr/bin/env bash
URL=https://foo.bar/baz.zip
PATH=/home/foo/bar/baz.zip
wget -O "$PATH" "$URL"
И только потом до мена дошло…