Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: separate Docker Compose file to run app #2393

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ To build the Docker image, run:
docker build -t europeana/portal.js -f packages/portal/Dockerfile .
```

### Docker Compose

To run everything with Docker Compose, including the app:

```shell
docker compose -f docker-compose.app.yml up
```

The app will be exposed on the host on port 8080.

## Testing

To run end-to-end tests, you will need Docker Engine and [Compose](https://docs.docker.com/compose/)
Expand Down
21 changes: 21 additions & 0 deletions docker-compose.app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
include:
- docker-compose.yml
services:
app:
image: europeana/portal.js:${TAG:-latest}
build:
context: .
dockerfile: ./packages/portal/Dockerfile
args:
IIIF_PRESENTATION_PLUGIN: ${IIIF_PRESENTATION_PLUGIN:-open-layers}
depends_on:
- postgres
- redis
env_file: packages/portal/.env
environment:
IIIF_PRESENTATION_PLUGIN: ${IIIF_PRESENTATION_PLUGIN:-open-layers}
POSTGRES_URL: postgres://postgres:${POSTGRES_PASSWORD:-postgres-password}@postgres/europeana_www
PORTAL_BASE_URL: http://localhost:8080
REDIS_URL: redis://redis
ports:
- "8080:8080"
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
pgadmin:
image: dpage/pgadmin4
Expand Down
2 changes: 2 additions & 0 deletions packages/portal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ COPY *.md ./
COPY packages/portal/*.js ./packages/portal/
COPY packages/portal/src ./packages/portal/src

ARG IIIF_PRESENTATION_PLUGIN

RUN npm run build
RUN rm -rf node_modules packages/*/node_modules packages/mirador packages/style
RUN rm -rf packages/portal/src/lang
Expand Down
Loading