diff --git a/.devcontainer/app.ini b/.devcontainer/app.ini new file mode 100644 index 000000000..5f411a8c5 --- /dev/null +++ b/.devcontainer/app.ini @@ -0,0 +1,54 @@ +BRAND_NAME = Gogs +RUN_USER = git +RUN_MODE = prod + +[database] +TYPE = sqlite3 +HOST = 127.0.0.1:5432 +NAME = gogs +SCHEMA = public +USER = gogs +PASSWORD = gogs +SSL_MODE = disable +PATH = data/gogs.db + +[repository] +ROOT = /data/git/gogs-repositories +DEFAULT_BRANCH = master + +[server] +DOMAIN = localhost +HTTP_PORT = 3000 +EXTERNAL_URL = http://localhost:3000 +DISABLE_SSH = false +SSH_PORT = 22 +START_SSH_SERVER = false +OFFLINE_MODE = false + +[mailer] +ENABLED = false + +[auth] +REQUIRE_EMAIL_CONFIRMATION = false +DISABLE_REGISTRATION = false +ENABLE_REGISTRATION_CAPTCHA = false +REQUIRE_SIGNIN_VIEW = false + +[user] +ENABLE_EMAIL_NOTIFICATION = false + +[picture] +DISABLE_GRAVATAR = false +ENABLE_FEDERATED_AVATAR = false + +[session] +PROVIDER = file + +[log] +MODE = file +LEVEL = Info +ROOT_PATH = /app/gogs/log + +[security] +INSTALL_LOCK = true +SECRET_KEY = MSB1OpGHpXS6FUD \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..275ee0aba --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile +{ + "name": "Existing Dockerfile", + "dockerComposeFile": "docker-compose.yml", + "service": "gogs", + "workspaceFolder": "/app/gogs/src", + + // 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": [ + 22, + 3000 + ] + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "cat /etc/os-release", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "devcontainer" +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 000000000..5581c2a99 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3' +services: + gogs: + build: + context: .. + dockerfile: Dockerfile + volumes: + - ..:/app/gogs/src + - ./app.ini:/data/gogs/conf/app.ini + ports: + - 22:22 + - 3000:3000