1
0
Fork 0
forked from TWS/kalkutago
kalkutago/docker-compose_dev.yml

76 lines
1.8 KiB
YAML
Raw Normal View History

version: "3.5"
services:
server:
# build: ./server
build:
context: ./server
dockerfile: Dockerfile.debug
networks:
- web
- internal
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password
POSTGRES_USER: kalkutago
POSTGRES_DB: kalkutago
POSTGRES_HOST: database
secrets: [ postgres-password ]
depends_on: [ database ]
expose: [ 8000 ]
# ports:
# # TODO remove in prod
# - 8000:8000
volumes:
- ./client/dist:/src/public:ro
labels:
traefik.enable: true
traefik.http.routers.kalkutago_server.rule: 'Host(`kalkutago`) && PathPrefix(`/api`)'
database:
image: postgres
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password
POSTGRES_USER: kalkutago
POSTGRES_DB: kalkutago
secrets: [ postgres-password ]
networks: [ internal ]
volumes:
- ./db.mount:/var/lib/postgresql/data
client_devserver:
image: node
volumes: [ ./client:/client/ ]
working_dir: /client
command: [ "sh", "-c", "yarn && yarn dev --host 0.0.0.0" ]
expose: [ 5173 ]
networks: [ web ]
labels:
traefik.enable: true
traefik.http.routers.kalkutago_client.rule: 'Host(`kalkutago`) && !PathPrefix(`/api`)'
traefik.http.services.kalkutago_client.loadbalancer.server.port: 5173
proxy:
image: traefik
volumes:
- source: /var/run/docker.sock
target: /var/run/docker.sock
type: bind
- source: ./traefik.yaml
target: /traefik.yaml
type: bind
- source: ./traefik-config
target: /config
type: bind
ports:
- 80:80
networks: [ web ]
secrets:
postgres-password:
file: ./server/postgres.pw
networks:
internal:
internal: true
web:
external: true