j40-cejst-2/docker-compose.yml
Vim 704831159f
dockerize front-end and pass env vars to npm build (#614)
* Revert "dockerize front end (#558)"

This reverts commit 89c23faf7a.

* dockerize frontend
- adds score server and website docker compose
- creates docker ignore
- adds .env.* for dev, prod and local
- adds dockerfile for website
- adds env to gatsby-config
- adds hostaddress to develop / start script
- adds istructions in README for running docker
- replaces fixed URLS with ones based on env vars
- creates a score server dockerfile

* updates README to change map tiles source

* adds env DATA_SOURCE:development to deploy GHA

* capitalize readme
2021-09-07 10:35:11 -07:00

40 lines
1.1 KiB
YAML

version: "3.4"
services:
# The j40_data_pipeline service runs the ETL pipeline to create the score
score:
image: j40_data_pipeline
container_name: j40_data_pipeline_1
build: data/data-pipeline
ports:
- 8888:8888
volumes:
- ./data/data-pipeline:/data-pipeline
stdin_open: true
tty: true
environment:
ENV_FOR_DYNACONF: development
PYTHONUNBUFFERED: 1
# The score_server serves the data-pipeline volume as a URL
j40_score_server:
image: j40_score_server
container_name: j40_score_server_1
build: data/data-serve/.
volumes:
- ./data/data-pipeline/data_pipeline/data/score:/data/data-pipeline/data_pipeline/data/score
ports:
- 5000:8080
#The j40_website service runs the web app / map / site
j40_website:
image: j40_website
container_name: j40_website_1
build: ./client
environment:
DATA_SOURCE: local
volumes:
- ./client/src:/client/src
ports:
- 8000:6000
depends_on:
- "j40_score_server"