docker-compose.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. services:
  2. app:
  3. build:
  4. context: .
  5. dockerfile: Dockerfile
  6. args:
  7. # Update 'VARIANT' to pick an LTS version of Node.js: 18, 16, 14, 12.
  8. # Append -bullseye or -buster to pin to an OS version.
  9. # Use -bullseye variants on local arm64/Apple Silicon.
  10. VARIANT: 22-bookworm
  11. volumes:
  12. - ..:/workspace
  13. - wiki-vscode-ext:/root/.vscode-server/extensions
  14. # Overrides default command so things don't shut down after the process ends.
  15. command: sleep infinity
  16. # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
  17. network_mode: service:db
  18. # Uncomment the next line to use a non-root user for all processes.
  19. # user: node
  20. # Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
  21. # (Adding the "ports" property to this file will not forward from a Codespace.)
  22. db:
  23. image: postgres:16
  24. restart: unless-stopped
  25. volumes:
  26. - postgres-data:/var/lib/postgresql/data
  27. environment:
  28. POSTGRES_PASSWORD: postgres
  29. POSTGRES_USER: postgres
  30. POSTGRES_DB: postgres
  31. pgadmin:
  32. image: dpage/pgadmin4:latest
  33. environment:
  34. - PGADMIN_DEFAULT_EMAIL=dev@js.wiki
  35. - PGADMIN_DEFAULT_PASSWORD=123123
  36. - PGADMIN_DISABLE_POSTFIX=True
  37. - PGADMIN_LISTEN_PORT=8000
  38. - PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
  39. - PGADMIN_CONFIG_LOGIN_BANNER="Login with dev@js.wiki / 123123"
  40. network_mode: service:db
  41. # volumes:
  42. # - ./pgadmin-servers.json:/pgadmin4/servers.json
  43. volumes:
  44. postgres-data:
  45. wiki-vscode-ext: