Compare commits
No commits in common. "d318654e6a5ba2dd8edd0cc48ecad9a521142071" and "ef6275a0720bf5b3a616375221d007f78e3654dc" have entirely different histories.
d318654e6a
...
ef6275a072
@ -1,27 +0,0 @@
|
|||||||
name: Docker Build
|
|
||||||
|
|
||||||
on: push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Login to Container Registry
|
|
||||||
run: |
|
|
||||||
docker login git.ambeles.nl \
|
|
||||||
-u ${{ secrets.REGISTRY_USERNAME }} \
|
|
||||||
-p ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build Docker Image
|
|
||||||
run: |
|
|
||||||
docker build -t git.ambeles.nl/bedroomghost/gpx-studio:${{ github.sha }} .
|
|
||||||
|
|
||||||
- name: Push Docker Image
|
|
||||||
run: |
|
|
||||||
docker tag git.ambeles.nl/bedroomghost/gpx-studio:${{ github.sha }} git.ambeles.nl/bedroomghost/gpx-studio:latest
|
|
||||||
docker push git.ambeles.nl/bedroomghost/gpx-studio:${{ github.sha }}
|
|
||||||
docker push git.ambeles.nl/bedroomghost/gpx-studio:latest
|
|
||||||
|
|
||||||
30
Dockerfile
30
Dockerfile
@ -1,30 +0,0 @@
|
|||||||
# Simple Dockerfile for the GPX viewer application
|
|
||||||
FROM node:18-alpine
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copy all source files
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build the GPX library first
|
|
||||||
WORKDIR /app/gpx
|
|
||||||
RUN npm install
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# Then build and run the website
|
|
||||||
WORKDIR /app/website
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# Expose the port for the dev server
|
|
||||||
EXPOSE 5173
|
|
||||||
|
|
||||||
# Create a simple startup script that injects the token from env var
|
|
||||||
RUN echo '#!/bin/sh' > /app/start.sh && \
|
|
||||||
echo 'echo "PUBLIC_MAPBOX_TOKEN=$PUBLIC_MAPBOX_TOKEN" > /app/website/.env' >> /app/start.sh && \
|
|
||||||
echo 'find /app/website -type f -name "*.js" -o -name "*.ts" -o -name "*.svelte" | xargs sed -i "s|https://brouter.gpx.studio|https://brouter.ambeles.nl|g"' >> /app/start.sh && \
|
|
||||||
echo 'cd /app/website && npm run dev -- --host 0.0.0.0' >> /app/start.sh && \
|
|
||||||
chmod +x /app/start.sh
|
|
||||||
|
|
||||||
# Command to start the application
|
|
||||||
CMD ["/app/start.sh"]
|
|
||||||
Loading…
x
Reference in New Issue
Block a user