Build docker from CI and move docker-compose config in another repo

https://framagit.org/framasoft/joinmobilizon/docker

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-11-09 10:04:55 +01:00
parent dfd3423ea1
commit 74fa9dca8c
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
3 changed files with 27 additions and 62 deletions

View File

@ -4,6 +4,7 @@ stages:
- check - check
- test - test
- deploy - deploy
- docker
variables: variables:
MIX_ENV: "test" MIX_ENV: "test"
@ -121,3 +122,29 @@ exunit:
# expire_in: 1 hour # expire_in: 1 hour
# paths: # paths:
# - public # - public
.docker: &docker
stage: docker
cache: {}
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/docker/production/Dockerfile --destination $DOCKER_IMAGE_NAME
build-docker-master:
<<: *docker
only:
- schedules
variables:
DOCKER_IMAGE_NAME: framasoft/mobilizon:master
build-docker-tag:
<<: *docker
only:
- tags
variables:
DOCKER_IMAGE_NAME: framasoft/mobilizon:$CI_COMMIT_TAG

View File

@ -1,42 +0,0 @@
version: "3"
services:
mobilizon:
image: framasoft/mobilizon
environment:
- MOBILIZON_INSTANCE_NAME
- MOBILIZON_INSTANCE_HOST
- MOBILIZON_INSTANCE_EMAIL
- MOBILIZON_REPLY_EMAIL
- MOBILIZON_ADMIN_EMAIL
- MOBILIZON_INSTANCE_REGISTRATIONS_OPEN
- MOBILIZON_DATABASE_USERNAME=${POSTGRES_USER}
- MOBILIZON_DATABASE_PASSWORD=${POSTGRES_PASSWORD}
- MOBILIZON_DATABASE_DBNAME=${POSTGRES_DB}
- MOBILIZON_DATABASE_HOST=db
- MOBILIZON_INSTANCE_SECRET_KEY_BASE
- MOBILIZON_INSTANCE_SECRET_KEY
- MOBILIZON_SMTP_SERVER
- MOBILIZON_SMTP_HOSTNAME
- MOBILIZON_SMTP_PORT
- MOBILIZON_SMTP_SSL
- MOBILIZON_SMTP_USERNAME
- MOBILIZON_SMTP_PASSWORD
volumes:
- ./public/uploads:/app/uploads
ports:
- "4000:4000"
db:
image: postgis/postgis
volumes:
- ./db:/var/lib/postgresql/data
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
networks:
default:
ipam:
driver: default

View File

@ -1,20 +0,0 @@
# Copy this file to .env, then update it with your own settings
# Database settings
POSTGRES_USER=mobilizon
POSTGRES_PASSWORD=changethis
POSTGRES_DB=mobilizon
# Instance configuration
MOBILIZON_INSTANCE_NAME=My Mobilizon Instance
MOBILIZON_INSTANCE_HOST=mobilizon.lan
MOBILIZON_INSTANCE_SECRET_KEY_BASE=changethis
MOBILIZON_INSTANCE_SECRET_KEY=changethis
MOBILIZON_INSTANCE_EMAIL=noreply@mobilizon.lan
MOBILIZON_REPLY_EMAIL=contact@mobilizon.lan
# Email settings
MOBILIZON_SMTP_SERVER=localhost
MOBILIZON_SMTP_HOSTNAME=localhost
MOBILIZON_SMTP_USERNAME=noreply@mobilizon.lan
MOBILIZON_SMTP_PASSWORD=password