-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
49 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Common bases for dev containers. | ||
# Not to be used directly, see compose.yaml. | ||
services: | ||
web-base: | ||
build: ./web/ | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./web/src:/usr/src/app/src | ||
- ./web/public:/usr/src/app/public | ||
|
||
server-base: | ||
build: | ||
context: ./server/ | ||
dockerfile: Dockerfile.dev | ||
target: dev | ||
env_file: | ||
- .env | ||
environment: | ||
- NODE_ENV=development | ||
- PORT=3001 | ||
volumes: | ||
- ./server/src:/usr/src/app/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Service containers for the development environment. | ||
services: | ||
nv-mock: | ||
image: mockoon/cli | ||
container_name: nv-mock | ||
ports: | ||
- 4002:4002 | ||
volumes: | ||
- ./nv-mock:/data | ||
command: "--port 4002 --data /data/nv-mock.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,44 @@ | ||
# Bootstraps the local development environment. Not for production use. | ||
# Bootstraps the local development environment. | ||
services: | ||
web-base: | ||
build: ./web/ | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./web/src:/usr/src/app/src | ||
- ./web/public:/usr/src/app/public | ||
web: | ||
extends: web-base | ||
extends: | ||
file: compose.base.yaml | ||
service: web-base | ||
container_name: keijo-web | ||
environment: | ||
- VITE_API_URL=http://localhost:3001/graphql | ||
ports: | ||
- 3000:5173 | ||
|
||
web-test: | ||
extends: web-base | ||
extends: | ||
file: compose.base.yaml | ||
service: web-base | ||
container_name: keijo-web-test | ||
environment: | ||
- VITE_API_URL=http://localhost:4001/graphql | ||
ports: | ||
- 4000:5173 | ||
|
||
server-base: | ||
build: | ||
context: ./server/ | ||
dockerfile: Dockerfile.dev | ||
target: dev | ||
env_file: | ||
- .env | ||
environment: | ||
- NODE_ENV=development | ||
- PORT=3001 | ||
volumes: | ||
- ./server/src:/usr/src/app/src | ||
|
||
server: | ||
extends: server-base | ||
extends: | ||
file: compose.base.yaml | ||
service: server-base | ||
container_name: keijo-server | ||
ports: | ||
- 3001:3001 | ||
|
||
server-test: | ||
extends: server-base | ||
extends: | ||
file: compose.base.yaml | ||
service: server-base | ||
container_name: keijo-server-test | ||
environment: | ||
- NETVISOR_API_URL=http://nv-mock:4002 | ||
ports: | ||
- 4001:3001 | ||
|
||
nv-mock: | ||
image: mockoon/cli | ||
container_name: nv-mock | ||
ports: | ||
- 4002:4002 | ||
volumes: | ||
- ./nv-mock:/data | ||
command: "--port 4002 --data /data/nv-mock.json" | ||
extends: | ||
file: compose.services.yaml | ||
service: nv-mock |