* WIP: start mongo engine * WIP: mongo accessor and admin * integrate mongo store to main * disable mongo tests by default, only in CI * connection with constructor * add mongo buffered writer * buffered mongo writer * fix nil responses on an empty list from mongo * missing mongo index for scores * cancelable store * add gridfs implementation of avatar store * fix race on mongo session copy * gridfs avatars without tmp files * move avatar store * minor comments and refactoring for avatar store * merged from current master * simplify gridfs reader * lint: fix minor warns * test mongo against env defined url * pass MONGO_REMARK_TEST to docker and travis * set dockerfile env for mongo test url * increase connect timeout in mongo tests * pass MONGO_REMARK_TEST to drone build * add MONGO_REMARK_TEST to branch stage of drone * mass mongo test url via build_args_from_env * populate mongo IP to docker build hosts * test env * pass mongo ip via .mongo * remove .mongo temp from git * add .mongo -> env to linter step * allow more time to autoflush writer test * default mongo tests to "mongo" if not in env * merge fresh master into * add test for mongo cleanup * msg for a failed test * lazy fix for failed test * add an ability to skip all mongo tests * add backend dev instructions * remove unused code from mongo server * move mongo testing to connection_test * restore testing.go * lint: minor warns for testing code
51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
# compose file for local development
|
|
# starts backend on 8080 with basic auth "dev:password" and Dev oauth2 provider on port 8084, UI on https://127.0.0.1:8080/web
|
|
#
|
|
# mongo-related tests needs mongodb container running - docker run -d -name=mongo mongo:3.6 --smallfiles
|
|
# start build with backend tests:
|
|
# MONGO_REMARK_TEST=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mongo) \
|
|
# docker-compose -f compose-dev-backend.yml build
|
|
#
|
|
# to skip mongo test set MONGO_REMARK_TEST=skip
|
|
#
|
|
# start remark42 service - docker-compose -f compose-dev-backend.yml up
|
|
version: '2'
|
|
|
|
services:
|
|
remark42:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- SKIP_FRONTEND_TEST=true
|
|
- MONGO_REMARK_TEST=skip # disable mongo tests on build by default. To allow remove =skip part and see above
|
|
|
|
image: umputun/remark42:dev
|
|
container_name: "remark42-dev"
|
|
hostname: "remark42-dev"
|
|
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "5"
|
|
|
|
ports:
|
|
- "8080:8080" # primary rest server
|
|
- "8084:8084" # local oauth2 server
|
|
|
|
environment:
|
|
- USER # preset environment, UID on the host machine, i.e `id -u`
|
|
- REMARK_URL=http://127.0.0.1:8080
|
|
- SECRET=12345
|
|
- STORE_BOLT_PATH=/srv/var/db
|
|
- BACKUP_PATH=/srv/var/backup
|
|
- DEBUG=true
|
|
- DEV_PASSWD=password
|
|
- AUTH_DEV=true # activate local oauth "dev"
|
|
- ADMIN=dev_user # set admin flag for default user on local ouath2
|
|
volumes:
|
|
- ./var:/srv/var
|
|
|
|
command: /srv/start.sh
|