mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 15:04:38 +01:00
Added docker and docker-compose
This commit is contained in:
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
FROM golang:1.21-alpine3.19
|
||||||
|
|
||||||
|
ENV GO111MODULE=on
|
||||||
|
|
||||||
|
WORKDIR /app/erupe
|
||||||
|
|
||||||
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
CMD [ "go", "run", "." ]
|
||||||
49
docker/docker-compose.yml
Normal file
49
docker/docker-compose.yml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
version: "3.9"
|
||||||
|
# 1. docker-compose up db pgadmin
|
||||||
|
# 2. Use pgadmin to restore db and also apply patch-schema
|
||||||
|
# 3. Configure the config.json example. in docker you can point to the service name for the database i.e db
|
||||||
|
# 4. In seperate terminal docker-compose up server
|
||||||
|
# 5. If all went well happy hunting!
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=postgres
|
||||||
|
- POSTGRES_PASSWORD=password
|
||||||
|
- POSTGRES_DB=erupe
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
pgadmin:
|
||||||
|
image: dpage/pgadmin4
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
PGADMIN_DEFAULT_EMAIL: test@test.com
|
||||||
|
PGADMIN_DEFAULT_PASSWORD: root
|
||||||
|
ports:
|
||||||
|
- "5050:80"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
server:
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
# If using prebuilt container change paths and config
|
||||||
|
build:
|
||||||
|
context: ../
|
||||||
|
volumes:
|
||||||
|
- ../config.json:/app/erupe/config.json
|
||||||
|
- ../bin:/app/erupe/bin
|
||||||
|
- ../savedata:/app/erupe/savedata
|
||||||
|
ports:
|
||||||
|
- "53312:53312" #Sign V1
|
||||||
|
- "8080:8080" #Sign V2
|
||||||
|
- "53310:53310" #Entrance
|
||||||
|
# Channels
|
||||||
|
- "54001:54001"
|
||||||
|
- "54002:54002"
|
||||||
|
- "54003:54003"
|
||||||
|
- "54004:54004"
|
||||||
|
- "54005:54005"
|
||||||
|
- "54006:54006"
|
||||||
|
- "54007:54007"
|
||||||
|
- "54008:54008"
|
||||||
|
|
||||||
Reference in New Issue
Block a user