Created
November 21, 2022 19:57
-
-
Save devinchristianson/3aebaf837a0902d74100c5be31075d6d to your computer and use it in GitHub Desktop.
agola docker-compose test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gateway: | |
apiExposedURL: "https://cicd.testurl.dev" | |
webExposedURL: "https://cicd.testurl.dev" | |
runserviceURL: "http://localhost:4000" | |
configstoreURL: "http://localhost:4002" | |
gitserverURL: "http://localhost:4003" | |
web: | |
listenAddress: ":8000" | |
tokenSigning: | |
method: hmac | |
key: thisissomekeyjustcuzthisissomekeyjustcuz | |
adminToken: "admintoken" | |
scheduler: | |
runserviceURL: "http://localhost:4000" | |
notification: | |
webExposedURL: "https://cicd.testurl.dev" | |
runserviceURL: "http://localhost:4000" | |
configstoreURL: "http://localhost:4002" | |
db: | |
type: postgres | |
connString: "postgres://postgres:testpassword@postgres:5432/notification?sslmode=disable" | |
configstore: | |
dataDir: /data/agola/configstore | |
db: | |
type: postgres | |
connString: "postgres://postgres:testpassword@postgres:5432/configstore?sslmode=disable" | |
objectStorage: | |
type: s3 | |
endpoint: "http://minio:9000" | |
bucket: configstore | |
accessKey: testaccesskey | |
secretAccessKey: testaccesskeytestaccesskeytestaccesskeytestaccesskey | |
web: | |
listenAddress: ":4002" | |
runservice: | |
debug: true | |
dataDir: /data/agola/runservice | |
db: | |
type: postgres | |
connString: "postgres://postgres:testpassword@postgres:5432/runservice?sslmode=disable" | |
objectStorage: | |
type: s3 | |
endpoint: "http://minio:9000" | |
bucket: runservice | |
accessKey: testaccesskey | |
secretAccessKey: testaccesskeytestaccesskeytestaccesskeytestaccesskey | |
web: | |
listenAddress: ":4000" | |
executor: | |
dataDir: /data/agola/executor | |
toolboxPath: ./bin | |
runserviceURL: "http://localhost:4000" | |
web: | |
listenAddress: ":4001" | |
activeTasksLimit: 2 | |
driver: | |
type: docker | |
allowPrivilegedContainers: false | |
gitserver: | |
dataDir: /data/agola/gitserver | |
gatewayURL: "http://localhost:8000" | |
web: | |
listenAddress: ":4003" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
minio: | |
image: "minio/minio" | |
restart: unless-stopped | |
expose: | |
- 9000 | |
environment: | |
MINIO_ACCESS_KEY: testaccesskey | |
MINIO_SECRET_KEY: testaccesskeytestaccesskeytestaccesskeytestaccesskey | |
command: minio server /configstore | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 | |
postgres: | |
image: postgres | |
restart: unless-stopped | |
environment: | |
POSTGRES_PASSWORD: testpassword | |
volumes: | |
- ./setup-dbs.sh:/docker-entrypoint-initdb.d/init-dbs.sh | |
command: ["postgres", "-c", "log_statement=all"] | |
agola: | |
image: sorintlab/agola:latest | |
restart: unless-stopped | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- ./config.yml:/config.yml | |
- agola-data:/data/agola | |
- agola-tmp:/tmp/agola | |
networks: | |
- default | |
command: ["serve", | |
"--components", "all-base,executor", | |
"--config", "/config.yml"] | |
depends_on: | |
- minio | |
- postgres | |
networks: | |
- default | |
volumes: | |
agola-data: | |
agola-tmp: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL | |
CREATE DATABASE runservice; | |
GRANT ALL PRIVILEGES ON DATABASE runservice TO postgres; | |
CREATE DATABASE notification; | |
GRANT ALL PRIVILEGES ON DATABASE notification TO postgres; | |
CREATE DATABASE configstore; | |
GRANT ALL PRIVILEGES ON DATABASE configstore TO postgres; | |
EOSQL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment