mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-21 13:38:21 -05:00
✨ Docker compose for development (#336)
* feat: development docker compose * chore: update readme.md to mention docker compose * refactor: requested change * revert: README.md --------- Co-authored-by: alamin655 <mdalamin655@outlook.com>
This commit is contained in:
parent
27bc52c008
commit
c80ae2fd14
15
dev.Dockerfile
Normal file
15
dev.Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Create Builder image
|
||||||
|
FROM --platform=$BUILDPLATFORM rust:1.73.0-alpine3.18
|
||||||
|
|
||||||
|
# Install required dependencies
|
||||||
|
RUN apk add --no-cache alpine-sdk musl-dev g++ make libcrypto3 libressl-dev perl build-base
|
||||||
|
|
||||||
|
RUN cargo install cargo-watch --locked
|
||||||
|
|
||||||
|
# Create project directory
|
||||||
|
RUN mkdir -p /project
|
||||||
|
WORKDIR /project
|
||||||
|
|
||||||
|
ENV RUSTFLAGS="-C target-feature=-crt-static"
|
||||||
|
|
||||||
|
ENTRYPOINT ["cargo"]
|
26
dev.docker-compose.yml
Normal file
26
dev.docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
version: "3.9"
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
container_name: redis
|
||||||
|
image: redis:6.2.5-alpine
|
||||||
|
tty: true
|
||||||
|
hostname: surfx-redis
|
||||||
|
websurx:
|
||||||
|
container_name: websurx-dev
|
||||||
|
image: websurfx:dev
|
||||||
|
working_dir: /project
|
||||||
|
tty: true
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: dev.Dockerfile
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: .
|
||||||
|
target: /project
|
||||||
|
command:
|
||||||
|
- watch
|
||||||
|
- -x
|
||||||
|
- run
|
Loading…
Reference in New Issue
Block a user