mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-03-31 02:02:54 +08:00
Merge f7ff04f4791a1def773e872394047034bc86bef9 into 4d6de1e2a80edfea95783fa9b09aaedf74dfe2c7
This commit is contained in:
commit
62ffc35f14
24
.devcontainer/devcontainer.json
Normal file
24
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,24 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/go
|
||||
{
|
||||
"name": "Go",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"dockerComposeFile": "./docker-compose.devcontainer.yaml",
|
||||
"service": "dev",
|
||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "go version",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
24
.devcontainer/docker-compose.devcontainer.yaml
Normal file
24
.devcontainer/docker-compose.devcontainer.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
services:
|
||||
dev:
|
||||
image: mcr.microsoft.com/devcontainers/go:1.22
|
||||
container_name: pokerogue-devcontainer-code
|
||||
volumes:
|
||||
- ../..:/workspaces:cached
|
||||
network_mode: service:db
|
||||
command: sleep infinity
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: mariadb:11
|
||||
container_name: pokerogue-devcontainer-db
|
||||
restart: on-failure
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: admin
|
||||
MYSQL_DATABASE: pokeroguedb
|
||||
MYSQL_USER: pokerogue
|
||||
MYSQL_PASSWORD: pokerogue
|
||||
ports:
|
||||
- '3306:3306'
|
||||
volumes:
|
||||
- ../.data/db:/var/lib/mysql
|
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for more information:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
# https://containers.dev/guide/dependabot
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "devcontainers"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
@ -80,4 +80,12 @@ Make sure that both 8000 and 8001 are portforwarded on your router.
|
||||
|
||||
Test that the server's game and game authentication works from other machines both in and outside of the network. Once this is complete, enjoy!
|
||||
|
||||
# Developing inside a Container:
|
||||
If you are not aware of Devcontainer please see [here](https://code.visualstudio.com/docs/devcontainers/containers)
|
||||
When you start up the container, a dev database is automatically created as well.
|
||||
To run your application you can simply use
|
||||
> go run rogueserver.go --debug --dbuser pokerogue --dbpass pokerogue
|
||||
|
||||
## Connecting to the frontend devcontainer
|
||||
You can connect both devcontainer by using the host computer as a bridge.
|
||||
(Default host ip: 172.17.0.1 OR host.docker.internal on MacOS / Linux)
|
Loading…
x
Reference in New Issue
Block a user