diff --git a/.drone-home.star b/.drone-home.star new file mode 100644 index 0000000..dbe593a --- /dev/null +++ b/.drone-home.star @@ -0,0 +1,14 @@ + +load("@this//commento:drone.star", "drone") +load("@this//commento:stack-name.star", "stackName") +load("@this//commento:stack-root.star", "stackRoot") + +def main(ctx): + return drone( + ctx, + "home-deploy", + stackRoot, + stackName, + [] + ) + \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5cfe0c5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,52 @@ +version: "3.7" +services: + commento: + deploy: + placement: + constraints: [node.labels.com.sigyl.git-stack-data == yes] + replicas: 1 + restart_policy: + condition: any + image: registry.gitlab.com/commento/commento:latest + environment: + COMMENTO_ORIGIN: $COMMENTO_ORIGIN + COMMENTO_SMTP_PASSWORD: $COMMENTO_SMTP_PASSWORD + COMMENTO_ASKIMET_KEY: $COMMENTO_ASKIMET_KEY + COMMENTO_SMTP_HOST: $COMMENTO_SMTP_HOST + COMMENTO_SMTP_PORT: $COMMENTO_SMTP_PORT + COMMENTO_SMTP_USERNAME: $COMMENTO_SMTP_USERNAME + COMMENTO_SMTP_FROM_ADDRESS: $COMMENTO_SMTP_FROM_ADDRESS + COMMENTO_GITHUB_KEY: $COMMENTO_GITHUB_KEY + COMMENTO_GITHUB_SECRET: $COMMENTO_GITHUB_SECRET + COMMENTO_FORBID_NEW_OWNERS: $COMMENTO_FORBID_NEW_OWNERS + COMMENTO_PORT: 8080 + COMMENTO_POSTGRES: postgres://${COMMENTO_POSTGRES_USER}:${COMMENTO_POSTGRES_PASSWORD}@commento-postgres:5432/${COMMENTO_POSTGRES_DB}?sslmode=disable + networks: + - appnet + - externalnet + commento-postgres: + deploy: + placement: + constraints: [node.labels.com.sigyl.git-stack-data == yes] + replicas: 1 + restart_policy: + condition: any + image: postgres:11-alpine + environment: + POSTGRES_DB: ${COMMENTO_POSTGRES_DB} + POSTGRES_USER: ${COMMENTO_POSTGRES_USER} + POSTGRES_PASSWORD: ${COMMENTO_POSTGRES_PASSWORD} + networks: + - appnet + volumes: + - commento-postgresql-data:/var/lib/postgresql/data +volumes: + commento-postgresql-data: + +networks: + appnet: + driver: overlay + #external: true + externalnet: + driver: overlay + external: true