From 87cc4534514da831ce14cb58c4c995c71ef3023e Mon Sep 17 00:00:00 2001 From: Guus van Meerveld Date: Sat, 9 Mar 2024 18:33:50 +0100 Subject: [PATCH] build: fixed docker build by adding tailwind and postcss --- .dockerignore | 2 ++ Dockerfile | 2 ++ docker-compose.yml | 24 +++++++++++------------- package.json | 8 ++++---- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.dockerignore b/.dockerignore index 55e2b52..030b614 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,8 @@ !.env !next.config.js +!tailwind.config.js +!postcss.config.js !tsconfig.json !package.json !yarn.lock diff --git a/Dockerfile b/Dockerfile index cf57695..dff6158 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,8 @@ RUN addgroup -g 1001 -S nodejs RUN adduser -S nextjs -u 1001 COPY --from=builder /app/next.config.js ./ +COPY --from=builder /app/postcss.config.js ./ +COPY --from=builder /app/tailwind.config.js ./ COPY --from=builder /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next COPY --from=builder /app/node_modules ./node_modules diff --git a/docker-compose.yml b/docker-compose.yml index 616a026..0d3327c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,15 @@ version: "3" services: - # app: - # build: . - # container_name: portfolio - # environment: - # NEXT_PUBLIC_GITEA_USERNAME: "Guusvanmeerveld" - # NEXT_PUBLIC_GITEA_SERVER: "git.guusvanmeerveld.dev" - # SESSION_PASSWORD: "jsdlakfjad;slkfjepoweaur3290r830-q998-039jaklfjdkl" - # NEXT_PUBLIC_ALLOW_REGISTRATION: true - # DATABASE_URL: "postgres://portfolio:portfolio@db:5432/portfolio" - # ports: - # - 3000:3000 + app: + build: . + container_name: portfolio + volumes: + - ./data:/app/data + environment: + DATABASE_URL: "postgres://portfolio:portfolio@db:5432/portfolio" + ports: + - 3000:3000 db: image: postgres:14 @@ -25,5 +23,5 @@ services: volumes: - db:/var/lib/postgresql/data -volumes: - db: \ No newline at end of file +volumes: + db: diff --git a/package.json b/package.json index 220e605..8446bd8 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,10 @@ "react-dom": "^18.2.0", "react-icons": "^5.0.1", "timeago.js": "^4.0.2", - "zod": "^3.20.6" + "zod": "^3.20.6", + "autoprefixer": "^10.4.18", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.0.0", @@ -39,14 +42,11 @@ "@types/node": "^15.12.1", "@types/react": "^17.0.9", "@types/react-dom": "^17.0.6", - "autoprefixer": "^10.4.18", "eslint": "^7.28.0", "eslint-config-next": "13.1.6", - "postcss": "^8.4.35", "prettier": "^2.3.1", "prisma": "^5.8.1", "sass": "^1.34.1", - "tailwindcss": "^3.4.1", "typescript": "^4.3.2" } }