Skip to content
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
5 changes: 4 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
UID2_CSTG_BASE_URL="https://operator-integ.uidapi.com"
UID2_CSTG_SERVER_PUBLIC_KEY="UID2-X-I-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo+jcPlk8GWn3iG0R5Il2cbFQI9hR3TvHxaBUKHl5Vh+ugr+9uLMiXihka8To07ETFGghEifY96Hrpe5RnYko7Q=="
UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU"
UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU"

UID2_API_KEY="your-api-key"
UID2_CLIENT_SECRET="your-client-secret"
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.idea/
.DS_Store
.env
.env

# Node.js
node_modules/
**/node_modules/
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,20 @@ docker-compose up -d --build prebid-client
### Available Services

- **`prebid-client`** - Prebid.js client-side integration (Port: 3031)
- **`javascript-sdk-client`** - JavaScript SDK client-server integration (Port: 3051)
- *More services will be added as they are containerized*

### Environment Configuration

Edit the `.env` file in the base directory to configure your UID2 settings:
```
# UID2 Configuration for all services
UID2_BASE_URL="http://localhost:8080"
SERVER_PUBLIC_KEY="your-public-key"
SUBSCRIPTION_ID="your-subscription-id"

# Additional variables for client-server example
UID2_API_KEY="your-api-key"
UID2_CLIENT_SECRET="your-client-secret"
```

32 changes: 22 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
prebid-client:
build:
Expand All @@ -8,20 +6,34 @@ services:
ports:
- "3031:3031"
container_name: prebid-client-side
env_file:
- .env

# Add more services here as needed
javascript-sdk-client-side:
build:
context: .
dockerfile: web-integrations/javascript-sdk/client-side/Dockerfile
ports:
- "3032:3032"
container_name: javascript-sdk-client-side
env_file:
- .env

# google-secure-signals-client:
# build:
# context: .
# dockerfile: web-integrations/google-secure-signals/client-side/Dockerfile
# ports:
# - "3032:3032"
# - "3033:3033"
# container_name: google-secure-signals-client

# javascript-sdk-client:
# build:
# context: .
# dockerfile: web-integrations/javascript-sdk/client-side/Dockerfile
# ports:
# - "3033:3033"
# container_name: javascript-sdk-client
javascript-sdk-client:
build:
context: .
dockerfile: web-integrations/javascript-sdk/client-server/Dockerfile
ports:
- "3051:3051"
container_name: javascript-sdk-client-server
env_file:
- .env
1 change: 0 additions & 1 deletion web-integrations/javascript-sdk/client-server/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion web-integrations/javascript-sdk/client-server/.gitkeep

This file was deleted.

16 changes: 13 additions & 3 deletions web-integrations/javascript-sdk/client-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
FROM node:20.11.0-alpine3.18

# Copy entrypoint script
COPY web-integrations/javascript-sdk/client-server/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

WORKDIR /usr/src/app

COPY . .
# Copy package files first for better caching
COPY web-integrations/javascript-sdk/client-server/package*.json ./
RUN npm install

EXPOSE 3000
CMD [ "npm", "start" ]
# Copy application files
COPY web-integrations/javascript-sdk/client-server/server.js ./
COPY web-integrations/javascript-sdk/client-server/public ./public/
COPY web-integrations/javascript-sdk/client-server/views ./views/

EXPOSE 3051
ENTRYPOINT ["/entrypoint.sh"]
4 changes: 4 additions & 0 deletions web-integrations/javascript-sdk/client-server/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# Start the Node.js application
exec npm start
Loading