basic changes
This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
FROM golang:1.19
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy everything from the current directory to the PWD (Present Working Directory) inside the container
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Download all the dependencies
|
||||||
|
RUN go get -d -v ./...
|
||||||
|
|
||||||
|
# Install the package
|
||||||
|
RUN go install -v ./...
|
||||||
|
|
||||||
|
RUN make
|
||||||
|
RUN go build -o bin/main src/*.go
|
||||||
|
|
||||||
|
# This container exposes port 8080 to the outside world
|
||||||
|
EXPOSE 4000
|
||||||
|
|
||||||
|
# Run the executable
|
||||||
|
CMD ["bin/main"]
|
||||||
71
config.yml
Normal file
71
config.yml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
environment: production
|
||||||
|
host: 0.0.0.0
|
||||||
|
port: 4000
|
||||||
|
redis: redis://redis:6379/0
|
||||||
|
routes:
|
||||||
|
face:
|
||||||
|
default_overlay: true
|
||||||
|
default_download: false
|
||||||
|
default_scale: 4
|
||||||
|
default_format: png
|
||||||
|
default_square: false
|
||||||
|
min_scale: 1
|
||||||
|
max_scale: 64
|
||||||
|
head:
|
||||||
|
default_overlay: true
|
||||||
|
default_download: false
|
||||||
|
default_scale: 4
|
||||||
|
default_format: png
|
||||||
|
default_square: false
|
||||||
|
min_scale: 1
|
||||||
|
max_scale: 64
|
||||||
|
full_body:
|
||||||
|
default_overlay: true
|
||||||
|
default_download: false
|
||||||
|
default_scale: 4
|
||||||
|
default_format: png
|
||||||
|
default_square: false
|
||||||
|
min_scale: 1
|
||||||
|
max_scale: 64
|
||||||
|
front_body:
|
||||||
|
default_overlay: true
|
||||||
|
default_download: false
|
||||||
|
default_scale: 4
|
||||||
|
default_format: png
|
||||||
|
default_square: false
|
||||||
|
min_scale: 1
|
||||||
|
max_scale: 64
|
||||||
|
back_body:
|
||||||
|
default_overlay: true
|
||||||
|
default_download: false
|
||||||
|
default_scale: 4
|
||||||
|
default_format: png
|
||||||
|
default_square: false
|
||||||
|
min_scale: 1
|
||||||
|
max_scale: 64
|
||||||
|
left_body:
|
||||||
|
default_overlay: true
|
||||||
|
default_download: false
|
||||||
|
default_scale: 4
|
||||||
|
default_format: png
|
||||||
|
default_square: false
|
||||||
|
min_scale: 1
|
||||||
|
max_scale: 64
|
||||||
|
right_body:
|
||||||
|
default_overlay: true
|
||||||
|
default_download: false
|
||||||
|
default_scale: 4
|
||||||
|
default_format: png
|
||||||
|
default_square: false
|
||||||
|
min_scale: 1
|
||||||
|
max_scale: 64
|
||||||
|
raw_skin:
|
||||||
|
default_download: false
|
||||||
|
default_format: png
|
||||||
|
cache:
|
||||||
|
store:
|
||||||
|
type: filestore
|
||||||
|
dir: store
|
||||||
|
skin_cache_duration: 12h # 12 hours
|
||||||
|
render_cache_duration: 12h # 12 hours
|
||||||
|
enable_locks: true
|
||||||
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
services:
|
||||||
|
minetar:
|
||||||
|
container_name: minetar
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
ports:
|
||||||
|
- "4000:4000"
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
redis:
|
||||||
|
image: docker.io/bitnami/redis:7.4
|
||||||
|
environment:
|
||||||
|
- ALLOW_EMPTY_PASSWORD=yes
|
||||||
|
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
|
||||||
|
volumes:
|
||||||
|
- 'redis_data:/bitnami/redis/data'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
redis_data:
|
||||||
|
driver: local
|
||||||
@@ -41,7 +41,7 @@ type DecodedTextures struct {
|
|||||||
|
|
||||||
// GetMinecraftProfile returns the textures of a Minecraft player from Mojang.
|
// GetMinecraftProfile returns the textures of a Minecraft player from Mojang.
|
||||||
func GetMinecraftProfile(uuid string) (*MinecraftProfile, error) {
|
func GetMinecraftProfile(uuid string) (*MinecraftProfile, error) {
|
||||||
req, err := http.NewRequest("GET", fmt.Sprintf("https://sessionserver.mojang.com/session/minecraft/profile/%s", uuid), nil)
|
req, err := http.NewRequest("GET", fmt.Sprintf("https://auth.oier.ovh/api/yggdrasil/sessionserver/session/minecraft/profile/%s", uuid), nil)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user