Skip to content

Commit 974a568

Browse files
committed
Fix code style
1 parent c885eeb commit 974a568

11 files changed

+115
-132
lines changed

.editorconfig

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ root = true
44

55
[*]
66
charset = utf-8
7-
indent_style = tab
7+
indent_style = space
88
indent_size = 4
99
end_of_line = lf
1010
insert_final_newline = true
1111
trim_trailing_whitespace = true
1212

13-
[*.{vhost,yml,php}]
14-
indent_style = space
13+
[*.sh]
14+
indent_style = tab

Dockerfile.template

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ RUN set -ex; \
77
# set recommended PHP.ini settings
88
# see https://secure.php.net/manual/en/opcache.installation.php
99
RUN { \
10-
echo 'opcache.memory_consumption=128'; \
11-
echo 'opcache.interned_strings_buffer=8'; \
12-
echo 'opcache.max_accelerated_files=4000'; \
13-
echo 'opcache.revalidate_freq=60'; \
14-
echo 'opcache.fast_shutdown=1'; \
15-
echo 'opcache.enable_cli=1'; \
16-
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
10+
echo 'opcache.memory_consumption=128'; \
11+
echo 'opcache.interned_strings_buffer=8'; \
12+
echo 'opcache.max_accelerated_files=4000'; \
13+
echo 'opcache.revalidate_freq=60'; \
14+
echo 'opcache.fast_shutdown=1'; \
15+
echo 'opcache.enable_cli=1'; \
16+
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
1717
%%VARIANT_EXTRAS%%
1818

1919
VOLUME /var/www/html
@@ -22,14 +22,14 @@ ENV YOURLS_VERSION %%VERSION%%
2222
#ENV YOURLS_SHA256 %%SHA256%%
2323

2424
RUN set -ex; \
25-
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
26-
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
25+
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
26+
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
2727
# upstream tarballs include ./YOURLS-${YOURLS_VERSION}/ so this gives us /usr/src/YOURLS-${YOURLS_VERSION}
28-
tar -xzf yourls.tar.gz -C /usr/src/; \
28+
tar -xzf yourls.tar.gz -C /usr/src/; \
2929
# move back to a common /usr/src/yourls
30-
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
31-
rm yourls.tar.gz; \
32-
chown -R www-data:www-data /usr/src/yourls
30+
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
31+
rm yourls.tar.gz; \
32+
chown -R www-data:www-data /usr/src/yourls
3333

3434
COPY docker-entrypoint.sh /usr/local/bin/
3535
COPY config-docker.php /var/www/html/

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 YOURLS
3+
Copyright (c) 2017-present YOURLS
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

apache/Dockerfile

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ RUN set -ex; \
77
# set recommended PHP.ini settings
88
# see https://secure.php.net/manual/en/opcache.installation.php
99
RUN { \
10-
echo 'opcache.memory_consumption=128'; \
11-
echo 'opcache.interned_strings_buffer=8'; \
12-
echo 'opcache.max_accelerated_files=4000'; \
13-
echo 'opcache.revalidate_freq=60'; \
14-
echo 'opcache.fast_shutdown=1'; \
15-
echo 'opcache.enable_cli=1'; \
16-
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
10+
echo 'opcache.memory_consumption=128'; \
11+
echo 'opcache.interned_strings_buffer=8'; \
12+
echo 'opcache.max_accelerated_files=4000'; \
13+
echo 'opcache.revalidate_freq=60'; \
14+
echo 'opcache.fast_shutdown=1'; \
15+
echo 'opcache.enable_cli=1'; \
16+
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
1717

1818
RUN a2enmod rewrite expires
1919

@@ -23,14 +23,14 @@ ENV YOURLS_VERSION 1.7.3
2323
#ENV YOURLS_SHA256 %%SHA256%%
2424

2525
RUN set -ex; \
26-
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
27-
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
26+
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
27+
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
2828
# upstream tarballs include ./YOURLS-${YOURLS_VERSION}/ so this gives us /usr/src/YOURLS-${YOURLS_VERSION}
29-
tar -xzf yourls.tar.gz -C /usr/src/; \
29+
tar -xzf yourls.tar.gz -C /usr/src/; \
3030
# move back to a common /usr/src/yourls
31-
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
32-
rm yourls.tar.gz; \
33-
chown -R www-data:www-data /usr/src/yourls
31+
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
32+
rm yourls.tar.gz; \
33+
chown -R www-data:www-data /usr/src/yourls
3434

3535
COPY docker-entrypoint.sh /usr/local/bin/
3636
COPY config-docker.php /var/www/html/

apache/config-docker.php

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22
/* This is a sample config file.
33
* Edit this file with your own settings and save it as "config.php"
4-
*
5-
* IMPORTANT: edit and save this file as plain ASCII text, using a text editor, for instance TextEdit on Mac OS or
6-
* Notepad on Windows. Make sure there is no character before the opening <?php at the beginning of this file.
74
*/
85

96
/*
@@ -59,17 +56,17 @@
5956
/** Username(s) and password(s) allowed to access the site. Passwords either in plain text or as encrypted hashes
6057
** YOURLS will auto encrypt plain text passwords in this file
6158
** Read http://yourls.org/userpassword for more information */
62-
$yourls_user_passwords = array(
63-
getenv('YOURLS_USER') => getenv('YOURLS_PASS'),
64-
);
59+
$yourls_user_passwords = [
60+
getenv('YOURLS_USER') => getenv('YOURLS_PASS'),
61+
];
6562

6663
/** Debug mode to output some internal information
6764
** Default is false for live site. Enable when coding or before submitting a new issue */
6865
define( 'YOURLS_DEBUG', getenv('YOURLS_DEBUG') ?: false );
6966

7067
/*
71-
** URL Shortening settings
72-
*/
68+
** URL Shortening settings
69+
*/
7370

7471
/** URL shortening method: 36 or 62 */
7572
define( 'YOURLS_URL_CONVERT', getenv('YOURLS_URL_CONVERT') ?: 36 );
@@ -80,14 +77,13 @@
8077
*/
8178

8279
/**
83-
* Reserved keywords (so that generated URLs won't match them)
84-
* Define here negative, unwanted or potentially misleading keywords.
85-
*/
86-
$yourls_reserved_URL = array(
87-
'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick',
88-
);
80+
* Reserved keywords (so that generated URLs won't match them)
81+
* Define here negative, unwanted or potentially misleading keywords.
82+
*/
83+
$yourls_reserved_URL = [
84+
'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick',
85+
];
8986

9087
/*
9188
** Personal settings would go after here.
9289
*/
93-

config-docker.php

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22
/* This is a sample config file.
33
* Edit this file with your own settings and save it as "config.php"
4-
*
5-
* IMPORTANT: edit and save this file as plain ASCII text, using a text editor, for instance TextEdit on Mac OS or
6-
* Notepad on Windows. Make sure there is no character before the opening <?php at the beginning of this file.
74
*/
85

96
/*
@@ -59,17 +56,17 @@
5956
/** Username(s) and password(s) allowed to access the site. Passwords either in plain text or as encrypted hashes
6057
** YOURLS will auto encrypt plain text passwords in this file
6158
** Read http://yourls.org/userpassword for more information */
62-
$yourls_user_passwords = array(
63-
getenv('YOURLS_USER') => getenv('YOURLS_PASS'),
64-
);
59+
$yourls_user_passwords = [
60+
getenv('YOURLS_USER') => getenv('YOURLS_PASS'),
61+
];
6562

6663
/** Debug mode to output some internal information
6764
** Default is false for live site. Enable when coding or before submitting a new issue */
6865
define( 'YOURLS_DEBUG', getenv('YOURLS_DEBUG') ?: false );
6966

7067
/*
71-
** URL Shortening settings
72-
*/
68+
** URL Shortening settings
69+
*/
7370

7471
/** URL shortening method: 36 or 62 */
7572
define( 'YOURLS_URL_CONVERT', getenv('YOURLS_URL_CONVERT') ?: 36 );
@@ -80,14 +77,13 @@
8077
*/
8178

8279
/**
83-
* Reserved keywords (so that generated URLs won't match them)
84-
* Define here negative, unwanted or potentially misleading keywords.
85-
*/
86-
$yourls_reserved_URL = array(
87-
'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick',
88-
);
80+
* Reserved keywords (so that generated URLs won't match them)
81+
* Define here negative, unwanted or potentially misleading keywords.
82+
*/
83+
$yourls_reserved_URL = [
84+
'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick',
85+
];
8986

9087
/*
9188
** Personal settings would go after here.
9289
*/
93-

fpm-alpine/Dockerfile

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ RUN set -ex; \
77
# set recommended PHP.ini settings
88
# see https://secure.php.net/manual/en/opcache.installation.php
99
RUN { \
10-
echo 'opcache.memory_consumption=128'; \
11-
echo 'opcache.interned_strings_buffer=8'; \
12-
echo 'opcache.max_accelerated_files=4000'; \
13-
echo 'opcache.revalidate_freq=60'; \
14-
echo 'opcache.fast_shutdown=1'; \
15-
echo 'opcache.enable_cli=1'; \
16-
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
10+
echo 'opcache.memory_consumption=128'; \
11+
echo 'opcache.interned_strings_buffer=8'; \
12+
echo 'opcache.max_accelerated_files=4000'; \
13+
echo 'opcache.revalidate_freq=60'; \
14+
echo 'opcache.fast_shutdown=1'; \
15+
echo 'opcache.enable_cli=1'; \
16+
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
1717

1818
RUN apk add --no-cache bash
1919

@@ -23,14 +23,14 @@ ENV YOURLS_VERSION 1.7.3
2323
#ENV YOURLS_SHA256 %%SHA256%%
2424

2525
RUN set -ex; \
26-
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
27-
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
26+
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
27+
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
2828
# upstream tarballs include ./YOURLS-${YOURLS_VERSION}/ so this gives us /usr/src/YOURLS-${YOURLS_VERSION}
29-
tar -xzf yourls.tar.gz -C /usr/src/; \
29+
tar -xzf yourls.tar.gz -C /usr/src/; \
3030
# move back to a common /usr/src/yourls
31-
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
32-
rm yourls.tar.gz; \
33-
chown -R www-data:www-data /usr/src/yourls
31+
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
32+
rm yourls.tar.gz; \
33+
chown -R www-data:www-data /usr/src/yourls
3434

3535
COPY docker-entrypoint.sh /usr/local/bin/
3636
COPY config-docker.php /var/www/html/

fpm-alpine/config-docker.php

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22
/* This is a sample config file.
33
* Edit this file with your own settings and save it as "config.php"
4-
*
5-
* IMPORTANT: edit and save this file as plain ASCII text, using a text editor, for instance TextEdit on Mac OS or
6-
* Notepad on Windows. Make sure there is no character before the opening <?php at the beginning of this file.
74
*/
85

96
/*
@@ -59,17 +56,17 @@
5956
/** Username(s) and password(s) allowed to access the site. Passwords either in plain text or as encrypted hashes
6057
** YOURLS will auto encrypt plain text passwords in this file
6158
** Read http://yourls.org/userpassword for more information */
62-
$yourls_user_passwords = array(
63-
getenv('YOURLS_USER') => getenv('YOURLS_PASS'),
64-
);
59+
$yourls_user_passwords = [
60+
getenv('YOURLS_USER') => getenv('YOURLS_PASS'),
61+
];
6562

6663
/** Debug mode to output some internal information
6764
** Default is false for live site. Enable when coding or before submitting a new issue */
6865
define( 'YOURLS_DEBUG', getenv('YOURLS_DEBUG') ?: false );
6966

7067
/*
71-
** URL Shortening settings
72-
*/
68+
** URL Shortening settings
69+
*/
7370

7471
/** URL shortening method: 36 or 62 */
7572
define( 'YOURLS_URL_CONVERT', getenv('YOURLS_URL_CONVERT') ?: 36 );
@@ -80,14 +77,13 @@
8077
*/
8178

8279
/**
83-
* Reserved keywords (so that generated URLs won't match them)
84-
* Define here negative, unwanted or potentially misleading keywords.
85-
*/
86-
$yourls_reserved_URL = array(
87-
'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick',
88-
);
80+
* Reserved keywords (so that generated URLs won't match them)
81+
* Define here negative, unwanted or potentially misleading keywords.
82+
*/
83+
$yourls_reserved_URL = [
84+
'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick',
85+
];
8986

9087
/*
9188
** Personal settings would go after here.
9289
*/
93-

fpm/Dockerfile

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ RUN set -ex; \
77
# set recommended PHP.ini settings
88
# see https://secure.php.net/manual/en/opcache.installation.php
99
RUN { \
10-
echo 'opcache.memory_consumption=128'; \
11-
echo 'opcache.interned_strings_buffer=8'; \
12-
echo 'opcache.max_accelerated_files=4000'; \
13-
echo 'opcache.revalidate_freq=60'; \
14-
echo 'opcache.fast_shutdown=1'; \
15-
echo 'opcache.enable_cli=1'; \
16-
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
10+
echo 'opcache.memory_consumption=128'; \
11+
echo 'opcache.interned_strings_buffer=8'; \
12+
echo 'opcache.max_accelerated_files=4000'; \
13+
echo 'opcache.revalidate_freq=60'; \
14+
echo 'opcache.fast_shutdown=1'; \
15+
echo 'opcache.enable_cli=1'; \
16+
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
1717

1818

1919
VOLUME /var/www/html
@@ -22,14 +22,14 @@ ENV YOURLS_VERSION 1.7.3
2222
#ENV YOURLS_SHA256 %%SHA256%%
2323

2424
RUN set -ex; \
25-
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
26-
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
25+
curl -o yourls.tar.gz -fsSL "https://github.com/YOURLS/YOURLS/archive/${YOURLS_VERSION}.tar.gz"; \
26+
#echo "YOURLS_SHA256 *yourls.tar.gz" | sha256sum -c -; \
2727
# upstream tarballs include ./YOURLS-${YOURLS_VERSION}/ so this gives us /usr/src/YOURLS-${YOURLS_VERSION}
28-
tar -xzf yourls.tar.gz -C /usr/src/; \
28+
tar -xzf yourls.tar.gz -C /usr/src/; \
2929
# move back to a common /usr/src/yourls
30-
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
31-
rm yourls.tar.gz; \
32-
chown -R www-data:www-data /usr/src/yourls
30+
mv "/usr/src/YOURLS-${YOURLS_VERSION}" /usr/src/yourls; \
31+
rm yourls.tar.gz; \
32+
chown -R www-data:www-data /usr/src/yourls
3333

3434
COPY docker-entrypoint.sh /usr/local/bin/
3535
COPY config-docker.php /var/www/html/

0 commit comments

Comments
 (0)