File tree 4 files changed +78
-0
lines changed
4 files changed +78
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM rust:1-buster
2
+
3
+ # RUN set -x \
4
+ # && apk upgrade --no-cache \
5
+ # && apk add --no-cache --virtual build-dependencies \
6
+ # build-base libc-dev linux-headers openssl openssl-dev bash \
7
+ # postgresql-dev postgresql-client openssl git less libpq \
8
+ # musl-dev wget git gcc
9
+
10
+ WORKDIR /app
11
+
12
+ COPY . /app
13
+
14
+ RUN cargo install diesel_cli --no-default-features --features postgres --verbose
15
+ RUN cargo build
Original file line number Diff line number Diff line change
1
+ app : cargo run
Original file line number Diff line number Diff line change
1
+ # For documentation on how to configure this file,
2
+ # see diesel.rs/guides/configuring-diesel-cli
3
+
4
+ [print_schema ]
5
+ file = " src/schema.rs"
6
+ import_types = [" diesel::sql_types::*" , " diesel_citext::sql_types::*" ]
Original file line number Diff line number Diff line change
1
+ version: '2.4'
2
+ services:
3
+
4
+ database:
5
+ image: library/postgres:13-alpine
6
+ volumes:
7
+ - postgres_data:/var/lib/postgresql/data
8
+ ports:
9
+ - "5445:5432"
10
+ environment:
11
+ POSTGRES_PASSWORD: example
12
+ POSTGRES_USER: postgres
13
+ POSTGRES_DB: mfmserver_development
14
+ command: 'postgres -c max_connections=300 -c shared_buffers=1GB'
15
+ networks:
16
+ mfmserver_net:
17
+ ipv4_address: 10.77.0.24
18
+ logging:
19
+ driver: "json-file"
20
+ options:
21
+ max-size: "10m"
22
+ max-file: "1"
23
+
24
+ app:
25
+ build:
26
+ context: .
27
+ dockerfile: Dockerfile
28
+ tty: true
29
+ stdin_open: true
30
+ volumes:
31
+ - ./:/app
32
+ - /app/tmp
33
+ links:
34
+ - database
35
+ environment:
36
+ DATABASE_URL: postgres://postgres:example@database:5432/mfmserver_development
37
+ ports:
38
+ - "3000:3000"
39
+ command: 'cargo run'
40
+ networks:
41
+ mfmserver_net:
42
+ ipv4_address: 10.77.0.23
43
+ logging:
44
+ driver: "json-file"
45
+ options:
46
+ max-size: "10m"
47
+ max-file: "1"
48
+
49
+ volumes:
50
+ postgres_data:
51
+ networks:
52
+ mfmserver_net:
53
+ driver: bridge
54
+ ipam:
55
+ config:
56
+ - subnet: 10.77.0.0/24
You can’t perform that action at this time.
0 commit comments