Aktualizacja Astro 5.0, Poprawka workflow
This commit is contained in:
@@ -10,18 +10,18 @@ jobs:
|
||||
runs-on: contabo-runner
|
||||
|
||||
steps:
|
||||
- name: Pull latest code
|
||||
- name: Update repository
|
||||
run: |
|
||||
cd /opt/fuz-site
|
||||
git reset --hard HEAD
|
||||
git pull
|
||||
|
||||
- name: Build image
|
||||
- name: Build
|
||||
run: |
|
||||
cd /opt/fuz-site
|
||||
docker compose -f docker-compose.prod.yml build
|
||||
|
||||
- name: Restart service
|
||||
- name: Restart
|
||||
run: |
|
||||
cd /opt/fuz-site
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
|
||||
24
Dockerfile
24
Dockerfile
@@ -1,7 +1,7 @@
|
||||
# ============================
|
||||
# 1) BUILD STAGE
|
||||
# ============================
|
||||
FROM node:18-alpine AS builder
|
||||
# ===========
|
||||
# 1) BUILDER
|
||||
# ===========
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -11,17 +11,17 @@ RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# ============================
|
||||
# 2) RUNTIME STAGE (alpine)
|
||||
# ============================
|
||||
FROM node:18-alpine
|
||||
# ===========
|
||||
# 2) RUNTIME
|
||||
# ===========
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY package*.json ./
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "dist/server/entry.mjs"]
|
||||
CMD ["node", "./dist/server/entry.mjs"]
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import tailwind from '@astrojs/tailwind';
|
||||
import node from '@astrojs/node';
|
||||
|
||||
export default defineConfig({
|
||||
srcDir: 'src',
|
||||
output: 'server',
|
||||
adapter: node({
|
||||
mode: "standalone"
|
||||
}),
|
||||
integrations: [
|
||||
tailwind({
|
||||
applyBaseStyles: true
|
||||
|
||||
@@ -8,13 +8,14 @@
|
||||
"preview": "astro preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"astro": "^4.0.0",
|
||||
"@astrojs/node": "^9.5.1",
|
||||
"astro": "^5.16.0",
|
||||
"js-yaml": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/tailwind": "^5.0.0",
|
||||
"tailwindcss": "^3.4.0",
|
||||
"autoprefixer": "^10.4.0",
|
||||
"postcss": "^8.4.0"
|
||||
"postcss": "^8.4.0",
|
||||
"tailwindcss": "^3.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user