kandimat/docker-compose.dev.yml
Christoph Lienhard 113653ec92 fix: Make kandimat useable
* Added nginx to reroute requests to different containers
* Made dev-containers more dev by utilizing volumes
  With that, changes on the hard-drive are immediately available in the container
Make kandimat useable
2022-02-02 22:07:55 +01:00

80 lines
1.7 KiB
YAML

version: '3.1'
services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/logs:/etc/nginx/logs
ports:
- "$PORT:80"
depends_on:
- redaktion
- user-app
- graphql
redaktion:
container_name: editor-app
image: node:16
working_dir: /app
volumes:
- ./redaktions-app:/app
entrypoint: ./run-dev.sh
environment:
- PUBLIC_URL=/editor/
- BACKEND_URL=$BACKEND_PATH
depends_on:
- graphql
user-app:
container_name: user-app
image: node:13
working_dir: /var/www/docker-vue
volumes:
- ./kandimat-user-app:/var/www/docker-vue
environment:
- VUE_APP_PUBLIC_URL=/user
- VUE_APP_BACKEND_URL=$BACKEND_PATH
- PORT=80
entrypoint: ./run-dev.sh
depends_on:
- graphql
postgres:
image: kandimat-postgres:11.5
container_name: postgres
build:
dockerfile: ./Dockerfile
context: ./backend/
environment:
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
env_file: ./backend/backend.env
restart: always
ports:
- "5432:5432"
volumes:
- "db-data:/var/lib/postgresql/data"
graphql:
restart: always
image: graphile/postgraphile
container_name: graphql
depends_on:
- postgres
env_file: ./backend/backend.env
command: [
"--connection", $DATABASE_URL,
"--cors",
"--schema", "kandimat_data",
"--default-role", "kandimat_anonymous",
"--jwt-token-identifier", "kandimat_data.jwt_token",
"--jwt-secret", $JWT_SECRET,
"--watch",
"--retry-on-init-fail",
"--enhance-graphiql",
"--classic-ids",
]
volumes:
db-data: