Skip to content

Commit

Permalink
build(docker): add profiles and change server entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxvd committed Oct 16, 2024
1 parent dc5b67c commit c1d14c5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
25 changes: 16 additions & 9 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ services:
- --entrypoints.web.address=:80
labels:
- "traefik.enable=true"
# # Dashboard
# Dashboard
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefik.service=api@internal"
ports:
# The HTTP port
- "80:80"
- "8181:80"
# The Web UI (enabled by --api.insecure=true)
- "8282:8080"
volumes:
Expand All @@ -39,6 +39,8 @@ services:

server:
build: .
entrypoint: ./entrypoint.sh
command: start
# env_file:
# - sb-server.env
environment:
Expand All @@ -59,6 +61,7 @@ services:
- ./uploads:/app/uploads
- public:/app/public
- ./log:/app/log
- ./entrypoint.sh:/app/entrypoint.sh
labels:
- "traefik.enable=true"
- "traefik.http.routers.sbserver.entrypoints=web"
Expand All @@ -75,13 +78,22 @@ services:
healthcheck:
test: [ "CMD-SHELL", "pg_isready -h localhost | grep accepting" ]

redis:
image: redis
ports:
- "6379:6379"
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]

testdb:
image: postgres:9.4
environment:
POSTGRES_PASSWORD: 'testpass'
POSTGRES_USER: 'testuser'
ports:
- "5434:5432"
profiles:
- test

dbadmin:
image: adminer
Expand All @@ -90,13 +102,8 @@ services:
- testdb
ports:
- "8080:8080"

redis:
image: redis
ports:
- "6379:6379"
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
profiles:
- tools

volumes:
public:
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

npm run enqueue organizations:export

npm "$@"

0 comments on commit c1d14c5

Please sign in to comment.