Rename folder for clarity

This commit is contained in:
Mike Conrad
2025-06-20 19:59:32 -04:00
parent b6c684cdd1
commit 03e9317041
64 changed files with 8 additions and 9 deletions

View File

@ -0,0 +1,47 @@
name: fullstack
services:
frontend:
image: frontend:latest
build:
context: ./frontend
target: develop
volumes:
- frontend_node_modules:/app/frontend/node_modules
- ./frontend/:/app/frontend/
labels:
- "traefik.http.routers.app.rule=Host(`app.docker.localhost`)"
reverse-proxy:
image: traefik:latest
command: --api.insecure=true --providers.docker
ports:
- 8888:80
- 8080:8080
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
backend:
image: backend:latest
build:
context: ./backend
labels:
- "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api"
- "traefik.http.routers.backend.rule=Host(`app.docker.localhost`) && PathPrefix(`/api`)"
- "traefik.http.routers.backend.middlewares=strip-api-prefix@docker"
depends_on:
db:
condition: service_healthy
db:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
healthcheck:
test: pg_isready --d postgres --user postgres
interval: 5s
# By default docker compose will create a bridge network using the folder name where the docker-compose.yml
# resides and attach all containers in the compose file to that network. This is important because it allows
# for easier container to container networking.
# Isolate our node_modules from our host system. Docker will handle creating these volumes
volumes:
frontend_node_modules:
backend_node_modules: