Skip to content

Commit

Permalink
adapt docker to express
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaprar committed Jun 1, 2024
1 parent 1777f1e commit 98cf420
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ COPY package.json package-lock.json postcss.config.js tailwind.config.js vite.co
RUN npm install

COPY src /app/src
COPY server/index.js /app/server/index.js
COPY public /app/public
COPY functions /app/functions
COPY index.html /app/
COPY entrypoint.sh /app/

RUN npm run build

ENTRYPOINT /app/entrypoint.sh
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ services:
build:
context: .
dockerfile: Dockerfile
# image: ghcr.io/alcaprar/pagescms:latest
ports:
- "8788:8788"
- "5173:5173"
- "3000:3000"
environment:
- GITHUB_CLIENT_ID=FILL_IN
- GITHUB_CLIENT_SECRET=FILL_IN
- GITHUB_CLIENT_ID=Ov23lizf1MrBLbVjp005
- GITHUB_CLIENT_SECRET=51795afaff57e22d4c7f3a0e35a4fbbcca597338
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ if [ -z "${GITHUB_CLIENT_SECRET-}" ]; then
exit 1
fi

BASE_URL="${BASE_URL:-http://localhost:8788}"
BASE_URL="${BASE_URL:-http://localhost:3000}"

CONFIG_FILE=".dev.vars"
CONFIG_FILE=".env"
touch $CONFIG_FILE
echo "BASE_URL = \"${BASE_URL}\"" > $CONFIG_FILE
echo "GITHUB_CLIENT_ID = \"${GITHUB_CLIENT_ID}\"" >> $CONFIG_FILE
echo "GITHUB_CLIENT_SECRET = \"${GITHUB_CLIENT_SECRET}\"" >> $CONFIG_FILE

npm run dev
node server/index.js

0 comments on commit 98cf420

Please sign in to comment.