feat: S3 storage for development environmne
This commit is contained in:
@@ -4,7 +4,9 @@ includes:
|
|||||||
tf: { taskfile: terraform, dir: terraform }
|
tf: { taskfile: terraform, dir: terraform }
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
dev: docker compose -f compose.dev.yml up --build --force-recreate --no-deps
|
dev:
|
||||||
|
- docker compose -f compose.dev.yml rm -fsv
|
||||||
|
- docker compose -f compose.dev.yml up --build --force-recreate --no-deps
|
||||||
|
|
||||||
deploy:fast: ansible-playbook playbooks/fast.yml
|
deploy:fast: ansible-playbook playbooks/fast.yml
|
||||||
deploy:slow: ansible-playbook playbooks/slow.yml
|
deploy:slow: ansible-playbook playbooks/slow.yml
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ services:
|
|||||||
# Gitea itself.
|
# Gitea itself.
|
||||||
gitea:
|
gitea:
|
||||||
container_name: web-git-instance
|
container_name: web-git-instance
|
||||||
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- backup
|
- backup
|
||||||
|
- bucket-script
|
||||||
build:
|
build:
|
||||||
context: gitea
|
context: gitea
|
||||||
dockerfile: Dockerfile.dev
|
dockerfile: Dockerfile.dev
|
||||||
@@ -31,7 +33,7 @@ services:
|
|||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
environment:
|
environment:
|
||||||
AWS_ENDPOINT: localstack:4566
|
AWS_ENDPOINT: localstack:4566
|
||||||
AWS_S3_BUCKET_NAME: test
|
AWS_S3_BUCKET_NAME: backup
|
||||||
AWS_ACCESS_KEY_ID: _
|
AWS_ACCESS_KEY_ID: _
|
||||||
AWS_SECRET_ACCESS_KEY: _
|
AWS_SECRET_ACCESS_KEY: _
|
||||||
BACKUP_CRON_EXPRESSION: "* * * * *"
|
BACKUP_CRON_EXPRESSION: "* * * * *"
|
||||||
@@ -59,7 +61,11 @@ services:
|
|||||||
AWS_ACCESS_KEY_ID: _
|
AWS_ACCESS_KEY_ID: _
|
||||||
AWS_SECRET_ACCESS_KEY: _
|
AWS_SECRET_ACCESS_KEY: _
|
||||||
AWS_ENDPOINT_URL: http://localstack:4566
|
AWS_ENDPOINT_URL: http://localstack:4566
|
||||||
command: '"aws s3api create-bucket --bucket test"'
|
command: |
|
||||||
|
"
|
||||||
|
aws s3api create-bucket --bucket backup
|
||||||
|
aws s3api create-bucket --bucket storage
|
||||||
|
"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ FROM gitea/gitea:latest-rootless
|
|||||||
ADD --chown=git:git config /etc/gitea
|
ADD --chown=git:git config /etc/gitea
|
||||||
ADD --chown=git:git custom /etc/gitea-custom
|
ADD --chown=git:git custom /etc/gitea-custom
|
||||||
|
|
||||||
|
ENV GITEA_CUSTOM=/etc/gitea-custom
|
||||||
|
|
||||||
RUN rm /etc/gitea/app.ini
|
RUN rm /etc/gitea/app.ini
|
||||||
RUN mv /etc/gitea/dev.app.ini /etc/gitea/app.ini
|
RUN mv /etc/gitea/dev.app.ini /etc/gitea/app.ini
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ PROTOCOL = https
|
|||||||
ROOT_URL = https://localhost:443/
|
ROOT_URL = https://localhost:443/
|
||||||
DOMAIN = localhost
|
DOMAIN = localhost
|
||||||
HTTP_PORT = 443
|
HTTP_PORT = 443
|
||||||
CERT_FILE = cert.pem
|
CERT_FILE = /etc/gitea-custom/cert.pem
|
||||||
KEY_FILE = key.pem
|
KEY_FILE = /etc/gitea-custom/key.pem
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
DB_TYPE = sqlite3
|
DB_TYPE = sqlite3
|
||||||
@@ -95,3 +95,12 @@ DEFAULT_TRUST_MODEL = committer
|
|||||||
|
|
||||||
[oauth2]
|
[oauth2]
|
||||||
JWT_SECRET = x-----------------------------------------x
|
JWT_SECRET = x-----------------------------------------x
|
||||||
|
|
||||||
|
[storage]
|
||||||
|
STORAGE_TYPE = minio
|
||||||
|
MINIO_ENDPOINT = localstack:4566
|
||||||
|
MINIO_ACCESS_KEY_ID = test
|
||||||
|
MINIO_SECRET_ACCESS_KEY = test
|
||||||
|
MINIO_BUCKET = storage
|
||||||
|
MINIO_USE_SSL = false
|
||||||
|
MINIO_INSECURE_SKIP_VERIFY = true
|
||||||
Reference in New Issue
Block a user