fixing docker and deployment
This commit is contained in:
parent
462c49f61d
commit
63c2ff2d76
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
api/server
|
||||
api/data.db
|
||||
*.yaml
|
||||
*.env
|
||||
|
14
README.md
14
README.md
@ -31,8 +31,9 @@ by running `admin_script`.
|
||||
|
||||
## Deployment
|
||||
Easiest way to deploy is to use docker. I have created a `compose.yaml` file so the API and the
|
||||
frontend application can be deployed easily with just the `docker compose up` command:
|
||||
frontend application can be deployed easily with just the `docker-compose up` command:
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
app:
|
||||
build: ./app
|
||||
@ -40,8 +41,7 @@ services:
|
||||
- "127.0.0.1:7002:7002"
|
||||
depends_on:
|
||||
- api
|
||||
enviroment:
|
||||
- VITE_API_URL_DEV="https://api.ngn.tf"
|
||||
env_file: all.env
|
||||
|
||||
api:
|
||||
build: ./api
|
||||
@ -49,8 +49,12 @@ services:
|
||||
- "127.0.0.1:7001:7001"
|
||||
volumes:
|
||||
- ./api/api.db:/api.db
|
||||
enviroment:
|
||||
- PASS=securepassword
|
||||
env_file: all.env
|
||||
```
|
||||
Enviroment variables can be set in the `all.env` file:
|
||||
```env
|
||||
PASS=securepassword
|
||||
VITE_API_URL_DEV="https://api.ngn.tf"
|
||||
```
|
||||
|
||||
## History
|
||||
|
2
api/.gitignore
vendored
2
api/.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
server
|
||||
api.db
|
||||
*.db
|
||||
|
@ -4,7 +4,7 @@ RUN apk update && apk upgrade && adduser -D svelte
|
||||
USER svelte
|
||||
|
||||
WORKDIR /app
|
||||
COPY --chown=svelteuser:svelte . /app
|
||||
COPY --chown=svelte:svelte . /app
|
||||
|
||||
RUN npm install && npm run build
|
||||
CMD ["npm", "run", "preview"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user