Skip to content

Commit 879f0e0

Browse files
Merge pull request #43 from Floorp-Projects/dev
Merging dev to production
2 parents d3a2884 + a524368 commit 879f0e0

File tree

123 files changed

+11788
-14301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+11788
-14301
lines changed

.env

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ENV=production
2+
SELF_URL=https://devtest.kou-gen.net

.eslintrc.json

-3
This file was deleted.
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
- master
8+
9+
jobs:
10+
build-website:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v2
17+
18+
- name: Log in to GitHub container registry
19+
uses: docker/login-action@v2
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.DOCKER_PUSH }}
24+
25+
- name: Lowercase the repo name
26+
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
27+
# Image name should be lowercase and: ghcr.io/<repo>-<branch>:latest
28+
- name: Get the image name
29+
run: echo "IMAGE_NAME=ghcr.io/${{ env.REPO }}-${{ github.ref_name }}" >>${GITHUB_ENV}
30+
31+
- name: Build and push container hashed image to registry
32+
uses: docker/build-push-action@v4
33+
with:
34+
platforms: amd64,arm64
35+
push: true
36+
# Hashed and latest tags
37+
tags: ${{ env.IMAGE_NAME }}:${{ github.sha }}, ${{ env.IMAGE_NAME }}:latest
38+
file: ./Dockerfile

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ yarn-error.log*
2727

2828
# local env files
2929
.env*.local
30+
!.env
3031

3132
# vercel
3233
.vercel
34+
35+
.idea/

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "i18n/dictionaries"]
2+
path = i18n/dictionaries
3+
url = https://github.com/Floorp-Projects/web-i18n.git

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.17.0
1+
20.13.1

Dockerfile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM node:lts as dependencies
2+
3+
WORKDIR /app
4+
COPY package.json ./
5+
RUN npm install
6+
7+
FROM node:lts as builder
8+
WORKDIR /app
9+
ENV NODE_ENV production
10+
ENV TZ=Asia/Tokyo
11+
COPY . .
12+
COPY --from=dependencies /app/node_modules ./node_modules
13+
14+
RUN npm run build
15+
16+
FROM node:lts as runner
17+
18+
WORKDIR /app
19+
ENV NODE_ENV production
20+
ENV BASE_URL=http://localhost:8887
21+
ENV NEXT_TELEMETRY_DISABLED 1
22+
ENV TZ=Asia/Tokyo
23+
24+
COPY --from=builder /app/next.config.js ./
25+
COPY --from=builder /app/*.ts ./
26+
COPY --from=builder /app/public ./public
27+
COPY --from=builder /app/.next ./.next
28+
COPY --from=builder /app/node_modules ./node_modules
29+
COPY --from=builder /app/package.json ./package.json
30+
COPY --from=builder /app/i18n ./i18n
31+
32+
EXPOSE 3000
33+
34+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)