Merge branch 'v2' of github.com:NamelessMC/Nameless-Docker into v2
This commit is contained in:
commit
45bb975383
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2020 Derkades
|
Copyright (c) 2020 NamelessMC Docker Image Maintainers (https://github.com/NamelessMC/Nameless-Docker/graphs/contributors)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
13
README.md
13
README.md
@ -16,12 +16,13 @@ You will need to install [Docker Compose](https://docs.docker.com/compose/) for
|
|||||||
sudo apt install docker-compose
|
sudo apt install docker-compose
|
||||||
```
|
```
|
||||||
|
|
||||||
Download the example file, optionally change the directories, passwords, etc. then run it with
|
Download [docker-compose.yml](https://github.com/NamelessMC/Nameless-Docker/raw/master/docker-compose.yml), optionally change some settings, then run `docker-compose up -d`. The default restart policy is `unless-stopped` so your website will start back up after a reboot.
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
When the containers are up, visit the website in a browser to start the installer. By default it listens on any interface, port 80.
|
When the containers are up, visit the website in a browser to start the installer. By default it listens on any interface, port 80.
|
||||||
|
|
||||||
When the database configuration page shows up, fill in `namelessmc_db` for the *database address*. For database username, password and database name, fill `nameless` for all of them, if you used default database credentials.
|
When the database configuration page shows up, fill in `db` for *database address*. For database username, password and database name, fill `nameless` for all of them, if you used default database credentials.
|
||||||
|
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
If you want to use Docker for developing NamelessMC, please see the [docker compose file in the main repo](https://github.com/NamelessMC/Nameless/blob/v2/docker-compose.yaml).
|
||||||
3
build.sh
3
build.sh
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
docker build -t derkades/namelessmc-nginx nginx_web
|
|
||||||
docker build -t derkades/namelessmc-php php_fpm
|
|
||||||
@ -2,21 +2,21 @@ version: '2'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
namelessmc:
|
nginx:
|
||||||
image: derkades/namelessmc-nginx
|
image: namelessmc/nginx
|
||||||
ports: ['80:80']
|
ports: ['80:80']
|
||||||
volumes: ['/srv/namelessmc/web:/data'] # same as php container
|
volumes: ['/srv/namelessmc/web:/data'] # same as php container
|
||||||
# environment:
|
# environment:
|
||||||
# PHP_FPM: namelessmc_php:9000
|
# PHP_FPM: php:9000
|
||||||
depends_on: [namelessmc_php]
|
depends_on: [php]
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
namelessmc_php:
|
php:
|
||||||
image: derkades/namelessmc-php
|
image: namelessmc/php
|
||||||
volumes: ['/srv/namelessmc/web:/data'] # same as web container
|
volumes: ['/srv/namelessmc/web:/data'] # same as web container
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
namelessmc_db:
|
db:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
volumes: ['/srv/namelessmc/db:/var/lib/mysql']
|
volumes: ['/srv/namelessmc/db:/var/lib/mysql']
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
ENV PHP_FPM="namelessmc_php:9000"
|
ENV PHP_FPM="php:9000"
|
||||||
|
|
||||||
RUN deluser xfs && \
|
RUN deluser xfs && \
|
||||||
delgroup www-data && \
|
delgroup www-data && \
|
||||||
|
|||||||
@ -31,6 +31,10 @@ http {
|
|||||||
try_files $uri $uri/ /index.php?route=$uri&$args;
|
try_files $uri $uri/ /index.php?route=$uri&$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~ \.(tpl|cache)$ {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
location = /robots.txt {
|
location = /robots.txt {
|
||||||
allow all;
|
allow all;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user