4 file(s) changed
- .dockerignore +2 -0
- api/.dockerignore +1 -0
- api/Dockerfile +20 -0
- docker-compose.yml +36 -0
.dockerignore
@@ -0,0 +1,2 @@
1 + api/node_modules
2 + frontend
api/.dockerignore
@@ -0,0 +1,1 @@
1 + node_modules
api/Dockerfile
@@ -0,0 +1,20 @@
1 + FROM node:24-alpine3.23
2 +
3 + RUN apk add -U bash postgresql17-client build-base yaml-dev
4 +
5 + ARG UID=1000
6 + ARG GID=1000
7 +
8 + USER "${UID}:${GID}"
9 +
10 + WORKDIR /app
11 +
12 + COPY --chown="${UID}:${GID}" package*.json .
13 +
14 + RUN npm i --frozen-lockfile
15 +
16 + COPY --chown="${UID}:${GID}" . .
17 +
18 + EXPOSE 3000
19 +
20 + CMD ["npm", "run", "dev"]
docker-compose.yml
@@ -0,0 +1,36 @@
1 + services:
2 + orbit_db:
3 + image: postgres:17-alpine
4 + shm_size: 1g
5 + user: postgres
6 + restart: always
7 + healthcheck:
8 + test: "pg_isready -U user --dbname=postgres"
9 + interval: 10s
10 + timeout: 5s
11 + retries: 5
12 + ports:
13 + - 5430:5432
14 + environment:
15 + POSTGRES_USER: user
16 + POSTGRES_DB: orbit_dev
17 + POSTGRES_PASSWORD: password
18 + volumes:
19 + - db_data:/var/lib/postgresql/data
20 +
21 + orbit_api:
22 + build: ./api
23 + volumes:
24 + - ./api:/app
25 + - /app/node_modules
26 + ports:
27 + - 3000:3000
28 + env_file:
29 + - api/.env
30 + depends_on:
31 + orbit_db:
32 + condition: service_healthy
33 + restart: always
34 +
35 + volumes:
36 + db_data: