Skip to content

Commit a276265

Browse files
authored
chore(docker-compose): improve docker-compose for dev env (#28)
1 parent e3bca27 commit a276265

File tree

4 files changed

+11
-25
lines changed

4 files changed

+11
-25
lines changed

.circleci/config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ jobs:
1010
- run:
1111
name: install
1212
command: |
13-
docker-compose -f docker-compose.yaml -f docker-compose.local.yaml -f docker-compose.local.ci.yaml up -d
13+
docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml up -d
1414
- run:
1515
name: lint
1616
command: |
1717
docker-compose exec api npm run lint
1818
- run:
1919
name: test
2020
command: |
21-
docker-compose exec -u root api mkdir -p data/audio
22-
docker-compose exec -u root api chown -R node:node data
2321
docker-compose exec api npm run test

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#### Local
1212

13-
1. `cp docker-compose.local.yaml docker-compose.override.yaml`
13+
1. `cp docker-compose.dev.yaml docker-compose.override.yaml`
1414
1. Edit `docker-compose.override.yaml` file to setup your environment variables
1515
1. `docker-compose up`
1616
1. Go to http://localhost:3030 to make sure blindtester is up and running
@@ -37,7 +37,7 @@ Listen to the given blind test id.
3737

3838
### Configuration
3939

40-
Configuration is done using environment variables (some good defaults can be found in [docker-compose.local.yaml](docker-compose.local.yaml)) which are listed below:
40+
Configuration is done using environment variables (some good defaults can be found in [docker-compose.dev.yaml](docker-compose.dev.yaml)) which are listed below:
4141

4242
| Variable | Description |
4343
|:-----------:|-------------|
@@ -89,7 +89,7 @@ If you want to distribute your application to other workspaces:
8989
### Start hacking
9090

9191
```shell
92-
cp docker-compose.local.yaml docker-compose.override.yaml
92+
cp docker-compose.dev.yaml docker-compose.override.yaml
9393

9494
# edit docker-compose.override.yaml file to setup your environment variables and uncomment the last lines of the file to run in "development" environment
9595

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ version: '3'
22

33
services:
44
api:
5+
# use "root" user to avoid useless file permissions issues
6+
user: root
7+
build:
8+
args:
9+
SET_DEVELOPMENT_NODE_ENV: 1
10+
command: npm run dev
511
environment:
612
PORT: 3030
713
NODE_APP_DIR: /home/node/app
@@ -29,12 +35,8 @@ services:
2935
ports:
3036
- '3030:3030'
3137

32-
# uncomment all the remaining lines below if you want to run in "development" environment
38+
# uncomment the following lines below if you want to update these files without having to rebuild your containers
3339

34-
# build:
35-
# args:
36-
# SET_DEVELOPMENT_NODE_ENV: 1
37-
# command: npm run dev
3840
# volumes:
3941
# - ./api/src:/home/node/app/src
4042
# - ./api/config:/home/node/app/config

docker-compose.local.ci.yaml

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

0 commit comments

Comments
 (0)