Skip to content

Commit

Permalink
Merge branch 'golang'
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed May 26, 2021
2 parents 32c9fe6 + 13ee5e7 commit 77206e1
Show file tree
Hide file tree
Showing 330 changed files with 14,171 additions and 6,426 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git/**
dist/**
node_modules/**

.gitignore
LICENSE
README
28 changes: 23 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
/nbproject/
/vendor/
composer.phar
config/config.json
.idea/
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

80 changes: 41 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
FROM php:7-fpm-alpine

RUN apk add --no-cache --virtual .composer-rundeps git subversion openssh-client mercurial tini bash patch make zip unzip coreutils \
&& apk add --no-cache --virtual .build-deps zlib-dev libzip-dev \
&& docker-php-ext-configure zip --with-libzip=/usr/include \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip opcache \
&& docker-php-ext-install pdo_mysql \
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --no-cache --virtual .composer-phpext-rundeps $runDeps \
&& apk del .build-deps \
&& printf "# composer php cli ini settings\n\
date.timezone=UTC\n\
memory_limit=-1\n\
opcache.enable_cli=1\n\
" > $PHP_INI_DIR/php-cli.ini

ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_HOME /tmp
ENV COMPOSER_VERSION 1.9.0

RUN curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://raw.githubusercontent.com/composer/getcomposer.org/cb19f2aa3aeaa2006c0cd69a7ef011eb31463067/web/installer \
&& php -r " \
\$signature = '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5'; \
\$hash = hash('sha384', file_get_contents('/tmp/installer.php')); \
if (!hash_equals(\$signature, \$hash)) { \
unlink('/tmp/installer.php'); \
echo 'Integrity check failed, installer is either corrupt or worse.' . PHP_EOL; \
exit(1); \
}" \
&& php /tmp/installer.php --no-ansi --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION} \
&& composer --ansi --version --no-interaction \
&& rm -f /tmp/installer.php \
&& find /tmp -type d -exec chmod -v 1777 {} +
###
# Builder to compile our golang code
###
FROM golang:alpine AS builder

ARG tags=none

ENV CGOENABLED=1

RUN go version && \
apk add --update --no-cache git curl nodejs nodejs-npm && \
mkdir /panel

WORKDIR /build
COPY . .
RUN go build -v -tags $tags -o /panel/panel -v github.com/MinecraftHopper/panel && \
npm install && \
npm run-script build && \
mv dist/* /panel

###
# Now generate our smaller image
###
FROM alpine

COPY --from=builder /panel /panel

ENV DISCORD.CLIENTID=
ENV DISCORD.CLIENTSECRET=
ENV DB.USERNAME=panel
ENV DB.PASSWORD=panel
ENV DB.HOST=127.0.0.1
ENV DB.DATABASE=panel
ENV SECRET.NAME=panel
ENV SESSION.SECRET=secret
ENV WEB.HOST=http://localhost:8080
ENV WEB.ROOT=/panel

WORKDIR /panel

EXPOSE 8080

RUN composer install
ENTRYPOINT ["/panel/panel"]
CMD []
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# Installation

1) Place the assets, config, error, and html into your web server folder.

2) Configure your web server to use html as the root folder

3) Configure your web server to send /assets/ to the assets folder

4) Configure your web server to send all php requests to /index.php

5) Execute the initialDatabase.sql file

6) Create a mysql user which has access to the authentication and factoid databases.

7) Set the mysql information in the config/config.php file. An example file is provided as defaultconfig.php.

8) Run the composer install and place /vendor at assets/php/

9) Execute the initialDatabase.sql in your database
# cp.ae97.net

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
1 change: 0 additions & 1 deletion assets/css/bootstrap-markdown.min.css

This file was deleted.

5 changes: 0 additions & 5 deletions assets/css/bootstrap.min.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/custom.min.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/dashboard.min.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/register.min.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/signin.min.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/theme.min.css

This file was deleted.

Binary file removed assets/fonts/glyphicons-halflings-regular.eot
Binary file not shown.
Loading

0 comments on commit 77206e1

Please sign in to comment.