Skip to content

Commit 50fd04e

Browse files
committed
fixes for circleci
1 parent b1f35c1 commit 50fd04e

File tree

4 files changed

+43
-25
lines changed

4 files changed

+43
-25
lines changed

.circleci/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# .circleci/config.yml
2+
version: 2.1
3+
4+
jobs:
5+
build:
6+
docker:
7+
- image: cimg/base:2022.07
8+
steps:
9+
- checkout
10+
- run: sudo apt-get update
11+
- setup_remote_docker:
12+
version: 20.10.14
13+
- run: |
14+
docker-compose up --build --abort-on-container-exit api-tests

docker-compose.dev.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3.9'
2+
3+
services:
4+
mongo:
5+
command: mongod --quiet --logpath /var/log/mongodb/mongodb.log
6+
ports:
7+
- 27017:27017
8+
api:
9+
environment:
10+
DEVELOPMENT: true
11+
volumes:
12+
- ./:/~/zhomemedia

docker-compose.override.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,30 @@ services:
1919
environment:
2020
DEVELOPMENT: false
2121
MONGO_HOST: mongo
22+
MONGO_USER: ${MONGO_USER}
23+
MONGO_PASSWORD: ${MONGO_PASSWORD}
2224
REDIS_SERVER: redis
2325
STORAGE: /storage
2426
volumes:
2527
- ${STORAGE}:/storage
2628
command: yarn start
2729
ports:
2830
- ${PORT}:${PORT}
31+
depends_on:
32+
- mongo
33+
- redis
34+
api-tests:
35+
build: .
36+
image: zhomemedia
37+
environment:
38+
DEVELOPMENT: true
39+
MONGO_HOST: mongo
40+
MONGO_USER: ${MONGO_USER}
41+
MONGO_PASSWORD: ${MONGO_PASSWORD}
42+
REDIS_SERVER: redis
43+
command: dockerize
44+
-wait tcp://mongo:27017 -wait tcp://redis:6379 -timeout 10s
45+
sh -c "yarn test"
2946
depends_on:
3047
- mongo
3148
- redis

0 commit comments

Comments
 (0)